variable help describe

L's

New member
Joined
Apr 11, 2007
Messages
2
Programming Experience
Beginner
what is the difference and similarities in regard to how the varriable user_id is trated?

OPTION EXPLICIT
Dim user_id as integer

------------------------

...
user_id = user_id + 65

...


and



OPTION EXPLICIT

----------------------

...
Dim user_id as integer
user_id = user_id + 20
 
the question is

its on my paper that ive got from teacher..and it asks in exact words:

carefully examine both sections of code below and outline the major difference and similarities in regard to how the variable USER_ID is treated?
 
Well, I think the 1st code portion is declare the user_id as global variable within the form, and can be refer by any method within the form.

The 2nd code is to declare the user_id as local variable and the variable will be destroy once the method or the block within the declaration finish.

I hope I guess it right.

Cheers.
 
Back
Top