[Implemented] Constants in data
[Implemented] Constants in data
Continuing with datasections, it would be handy if constants could be used there too
Re: Constants in data
In addition, being able to use constants as default parameters in procedures would be useful to.
Re: Constants in data
Both should work IIRC
Re: Constants in data
@MrTAToad:
1.)
2.)
Greetings ... Peter
1.)
Code: Select all
#ConstantWithValue1 = 1
#ConstantWithValue2 = 2
Read Value
Debug Value ; -> 1
Read Value
Debug Value ; -> 2
DataSection
Data.i #ConstantWithValue1, #ConstantWithValue2
EndDataSection
2.)
Code: Select all
#ConstantWithValue1 = 1
Procedure Test(Parameter = #ConstantWithValue1)
Debug Parameter
EndProcedure
Test() ; -> 1
Test(10) ; -> 10
Re: Constants in data
Yes, they are working now, which is good!