Hi,
Ok, some Xbasic technical stuff...
I'm still amazed how A5 handles variables and types definitions.
I create a script 'Script_INIT' where I declare a TYPE ... END TYPE and two shared variables and assign some text to the variables and execute it. IMHO A5 throws two variables in the 'shared' namespace. Question: what happens to the TYPE ... END TYPE?
Now I create a function Func_B():
Now I create a thirth script 'RunIT' that starts the Func_B() function.
To start the whole cyclus I first start 'Script_INIT'. After that I start RunIT.
I see that I can use a TYPE definition declared in another script! I thought it is restricted to the function where the TYPE .. END TYPE is declared.
Could this be added to the help file, subject TYPE .. END TYPE for more clarification about this command?
Regards,
Marcel
Ok, some Xbasic technical stuff...
I'm still amazed how A5 handles variables and types definitions.
I create a script 'Script_INIT' where I declare a TYPE ... END TYPE and two shared variables and assign some text to the variables and execute it. IMHO A5 throws two variables in the 'shared' namespace. Question: what happens to the TYPE ... END TYPE?
Code:
dim shared MyVar as C dim shared MyArray[4] as C 'Just do a type defenition for modem LED's. type ML TD as L RD as L DTR as L CTS as L end type 'Assign some text to the vars in this script. MyVar = "Text assigned in script_A" MyArray[1] = "Text assigned in script_A to array" end
Code:
FUNCTION Func_B AS C ( ) dim MLeds as {ML}'Here I use a type that is declared in Script_INIT. MLeds.TD = .T. MLeds.RD = .T. ui_msg_box("Show something",MyVar) ui_msg_box("Show Array",MyArray[1]) ui_msg_box("Show MLeds.TD",convert_type(MLeds.TD,"C")) END FUNCTION
Code:
Func_B()
I see that I can use a TYPE definition declared in another script! I thought it is restricted to the function where the TYPE .. END TYPE is declared.
Could this be added to the help file, subject TYPE .. END TYPE for more clarification about this command?
Regards,
Marcel