|
Post by Stefan Pendl on May 6, 2021 4:17:44 GMT -5
The following code only displays a few default global variables in LB5, but works as expected in LB4.5.1
'test buildin global variables.bas 'Author: Stefan Pendl 'Date: 06.05.21
globalVariables$ = "CommandLine$ DisplayWidth DisplayHeight Drives$ DefaultDir$ Version$ NullColumn$ NullColumn SpecialKey$ Inkey$ Platform$ StartupDir$" globalVariables$ = globalVariables$; " UpperLeftX UpperLeftY WindowWidth WindowHeight Err Err$" globalVariables$ = globalVariables$; " BackgroundColor$ ComboboxColor$ TextboxColor$ TexteditorColor$ ForegroundColor$ ListboxColor$" globalVariables$ = globalVariables$; " PrintCollate PrintCopies PrinterFont$ PrinterName$"
i = 1 while word$(globalVariables$, i) <> "" varLen = len(word$(globalVariables$, i)) if varLen > maxLen then maxLen = varLen
i = i + 1 wend
dim gVariables$(i-1)
i = 1 while word$(globalVariables$, i) <> "" gVariables$(i) = word$(globalVariables$, i)
i = i + 1 wend
sort gVariables$(), 1, i-1
for j = 1 to i-1 if len(eval$(gVariables$(j))) < 1 then print gVariables$(j); " "; replstrLb5$(space$(maxLen + 3 - len(gVariables$(j))), " ", ".") else print gVariables$(j); " "; replstrLb5$(space$(maxLen + 3 - len(gVariables$(j))), " ", "."); " "; eval$(gVariables$(j)) end if next end
function replstrLb5$(string$, find$, replace$) replstrLb5$ = ""
for i = 1 to len(string$) current$ = mid$(string$, i, 1)
if current$ = find$ then replstrLb5$ = replstrLb5$; replace$ else replstrLb5$ = replstrLb5$; current$ end if next end function
Thanks in advance for fixing.
|
|
|
Post by Carl Gundel on May 26, 2021 22:24:20 GMT -5
The following code only displays a few default global variables in LB5, but works as expected in LB4.5.1
'test buildin global variables.bas 'Author: Stefan Pendl 'Date: 06.05.21 <snipped code>
Thanks in advance for fixing. Fixed in build 353.
|
|