03-29-2005, 09:20 PM
Local str variables are automatically destroyed when the function returns. If you want to return local str variable, declare the function as str.
or pass b by reference (recommended):
or create member function str.Get_File_Date:
function'str $fn
SYSTEMTIME st
str a
lpstr s=GetFileInfo(fn 0 0 0 &st 0 0 1)
a.format("%u/%u/%u" st.wMonth st.wDay st.wYear)
ret a
or pass b by reference (recommended):
function $fn str&a
SYSTEMTIME st
GetFileInfo(fn 0 0 0 &st 0 0 1)
a.format("%u/%u/%u" st.wMonth st.wDay st.wYear)
or create member function str.Get_File_Date: