[Implemented] Constants in data
Posted: Tue Feb 14, 2017 2:53 pm
Continuing with datasections, it would be handy if constants could be used there too
- a basic to master the web -
https://forums.spiderbasic.com/
Code: Select all
#ConstantWithValue1 = 1
#ConstantWithValue2 = 2
Read Value
Debug Value ; -> 1
Read Value
Debug Value ; -> 2
DataSection
Data.i #ConstantWithValue1, #ConstantWithValue2
EndDataSection
Code: Select all
#ConstantWithValue1 = 1
Procedure Test(Parameter = #ConstantWithValue1)
Debug Parameter
EndProcedure
Test() ; -> 1
Test(10) ; -> 10