johndelphi
IS-IT--Management
const
sSource =
'unit %s;' + #13#10 +
'// Username: ' + GetWindowsUserName + #13#10 +
'// Time: ' + DateToStr(Date) + #13#10 +
'' + #13#10 +
'interface' + #13#10 +
'' + #13#10 +
'uses' + #13#10 +
' SysUtils;' + #13#10 +
'' + #13#10 +
'type' + #13#10 +
' { Enter your type variables }' + #13#10 +
' private' + #13#10 +
' { Private declarations }' + #13#10 +
' public' + #13#10 +
' { Public declarations }' + #13#10 +
' end;' + #13#10 +
'' + #13#10 +
'var' + #13#10 +
' %s: T%s;' + #13#10 +
'' + #13#10 +
'implementation' + #13#10 +
'' + #13#10 +
'{$R *.DFM}' + #13#10 +
'' + #13#10 +
'end.';
getWindowsUserName and DateToStr need to be constants too because the sSource is a const input to another procedure.
how do i make the 2 functions const?
sSource =
'unit %s;' + #13#10 +
'// Username: ' + GetWindowsUserName + #13#10 +
'// Time: ' + DateToStr(Date) + #13#10 +
'' + #13#10 +
'interface' + #13#10 +
'' + #13#10 +
'uses' + #13#10 +
' SysUtils;' + #13#10 +
'' + #13#10 +
'type' + #13#10 +
' { Enter your type variables }' + #13#10 +
' private' + #13#10 +
' { Private declarations }' + #13#10 +
' public' + #13#10 +
' { Public declarations }' + #13#10 +
' end;' + #13#10 +
'' + #13#10 +
'var' + #13#10 +
' %s: T%s;' + #13#10 +
'' + #13#10 +
'implementation' + #13#10 +
'' + #13#10 +
'{$R *.DFM}' + #13#10 +
'' + #13#10 +
'end.';
getWindowsUserName and DateToStr need to be constants too because the sSource is a const input to another procedure.
how do i make the 2 functions const?