Posted: Fri Jan 18, 2002 12:11 am
Restored from previous forum. Originally posted by Franco.
Hi all,
a constant is an integer value (in the future also a float and a string ) witch is set once and you are not able to change it anymore, right?
Well I can code this:
#ConstantValue.w=200+175 ;two different values combined
Now if I want to make this:
VariableA.w=200
VariableB.w=175
#ConstantValue.w=VariableA+VariableB
I get an error message:
"A constant can't be composed by a variable or a function"
Why?
Once the constant is set the variables can change but the constant has to remain the same, because you can't alter it.
Example:
NewPassWord.l=InputBox("Please enter your password","Only numbers for now...",0)
RequestedPassWord.l=InputBox("Please confirm your password","The same number please...",0)
If NewPassWord=RequestedPassWord
#PassWord.l=NewPassWord ;want be sure that nobody and nothing can alter this value!
;Now store #PassWord in a specified place... or whatever
EndIf
(You are right, this was a bad example...)
Am I wrong? Or is it too difficult to achieve? To human?
Have a nice day...
Franco
Hi all,
a constant is an integer value (in the future also a float and a string ) witch is set once and you are not able to change it anymore, right?
Well I can code this:
#ConstantValue.w=200+175 ;two different values combined
Now if I want to make this:
VariableA.w=200
VariableB.w=175
#ConstantValue.w=VariableA+VariableB
I get an error message:
"A constant can't be composed by a variable or a function"
Why?
Once the constant is set the variables can change but the constant has to remain the same, because you can't alter it.
Example:
NewPassWord.l=InputBox("Please enter your password","Only numbers for now...",0)
RequestedPassWord.l=InputBox("Please confirm your password","The same number please...",0)
If NewPassWord=RequestedPassWord
#PassWord.l=NewPassWord ;want be sure that nobody and nothing can alter this value!
;Now store #PassWord in a specified place... or whatever
EndIf
(You are right, this was a bad example...)
Am I wrong? Or is it too difficult to achieve? To human?
Have a nice day...
Franco