Home | Reviews | GUIpedia | Forum | Fun500
aguma | COMMONCould someone give me an example of how it works? Cause QB keeps saying 'Duplicate definition' :P.
Thanks! | 2008-10-19 | 7:30 PM |
trolly | Re:COMMON"Common" is used to share variables betwen chained programs (see "chain" instruction) ; work for .bas file not for exe
example:
at first 'progA.bas
[code]
COMMON SHARED varA as integer
print varA ' output will be 0
varA=10
chain "progB.BAS"
[/code]
now we can use varA modified by progA in progB.bas
[code]
COMMON SHARED varA as integer
print varA ' output will be 10
system
[/code] | 2008-10-19 | 8:05 PM |
Todd | Re:COMMONCOMMON is typically used in assigning variables in a library include too. Did you have a look at QB's documentation? It should say something about how COMMON works. My guess would be with trolly's. | 2008-10-19 | 9:08 PM |
aguma | Re:COMMONWell it still gives me 'duplicate definition', although i
think I know what the problem is | 2008-10-19 | 9:33 PM |
BASIC Programming Help
2021 Brandon Cornell