In VB for windows, we have these reserved words: "PRIVATE" and "PUBLIC".
But not in VBDOS.
So, how to make variables visible in all modules?
I need an Example.
Thank.
VBDOS Scope, newbie question
Moderators:Administrator, Global Moderator
- frankiebaby
- Global Moderator
- Posts:95
- Joined:Tue Apr 30, 2002 1:38 am
- Location:Pennsylvania
- Contact:
Re: VBDOS Scope, newbie question
use the SHARED keyword:
DIM SHARED Var AS INTEGER
DIM SHARED Var2 AS STRING * 5
DIM SHARED Var%
DIM SHARED Var2$
DIM SHARED Var3 AS DOUBLE
DIM SHARED Var3!
DIM SHARED Var AS INTEGER
DIM SHARED Var2 AS STRING * 5
DIM SHARED Var%
DIM SHARED Var2$
DIM SHARED Var3 AS DOUBLE
DIM SHARED Var3!
Re: VBDOS Scope, newbie question
No, wrong.
"DIM SHARED" doesn't work!
"COMMON SHARED" doen't work!
"COMMON" doen't work!
See part of my code:
------------------------------------
REM This is the "start file"
TYPE Registro
Name as STRING * 34
END TYPE
DIM SHARED People as Registro
------------------------------------
REM This is any form
SUB asdf_click
People.Name = "asdf"
END SUB
------------------------------------
The debugger say, People.Name is Single, not register
"DIM SHARED" doesn't work!
"COMMON SHARED" doen't work!
"COMMON" doen't work!
See part of my code:
------------------------------------
REM This is the "start file"
TYPE Registro
Name as STRING * 34
END TYPE
DIM SHARED People as Registro
------------------------------------
REM This is any form
SUB asdf_click
People.Name = "asdf"
END SUB
------------------------------------
The debugger say, People.Name is Single, not register
H8OR
Re: VBDOS Scope, newbie question
Thank you Frankiebaby!
I found the right code.
In this faq, if anyone want to know:
http://www.dossolutions.pwp.blueyonder.co.uk/vbfaq.html
Thank you!
H8OR
I found the right code.
In this faq, if anyone want to know:
http://www.dossolutions.pwp.blueyonder.co.uk/vbfaq.html
Thank you!
H8OR
H8OR