Page 1 of 1

Assigning a series of local variables

Posted: Tue Sep 24, 2019 5:00 pm
by Dutchman
Values can be assigned to a series of global variables in a single statement, for example:
r, g, b, = 1.1.0
However, this does not work outside of a function with local variables of that function eg:
Functional (r, g, b) = 1.1.0
See test in the following code.

Code: Select all

'Test for assigning a series of local values
Function.b=1 ' default blue
'--- test for series assignement yellow
Function.(r,g,b) = 1,1,0 
'--- Run
CALL Function
END

DEF Function
  DRAW CLEAR r,g,b
END DEF
Could that be possible :?:
This helps in assigning static parameters in functions such as viewtopic.php?f=4&p=288#p288

Re: Assigning a series of local variables

Posted: Tue Sep 24, 2019 5:03 pm
by kibernetik
In your example it should be done like this:

Code: Select all

Function.r,Function.g,Function.b = 1,1,0

Re: Assigning a series of local variables

Posted: Tue Sep 24, 2019 5:43 pm
by Dutchman
I knew that and I didn't ask.
I find this type of reaction unpleasant :(

Re: Assigning a series of local variables

Posted: Tue Sep 24, 2019 6:33 pm
by kibernetik
I understood your post as a question.
If this is a syntax suggestion, then thank you for the suggestion.