Assigning a series of local variables

Ideas for improvement
Post Reply
User avatar
Dutchman
Posts: 148
Joined: Tue Aug 06, 2019 4:47 pm
Location: Netherlands

Assigning a series of local variables

Post by Dutchman » Tue Sep 24, 2019 5:00 pm

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
It is still a long way to go

User avatar
kibernetik
Site Admin
Posts: 131
Joined: Tue Aug 06, 2019 3:03 pm

Re: Assigning a series of local variables

Post by kibernetik » Tue Sep 24, 2019 5:03 pm

In your example it should be done like this:

Code: Select all

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

User avatar
Dutchman
Posts: 148
Joined: Tue Aug 06, 2019 4:47 pm
Location: Netherlands

Re: Assigning a series of local variables

Post by Dutchman » Tue Sep 24, 2019 5:43 pm

I knew that and I didn't ask.
I find this type of reaction unpleasant :(
It is still a long way to go

User avatar
kibernetik
Site Admin
Posts: 131
Joined: Tue Aug 06, 2019 3:03 pm

Re: Assigning a series of local variables

Post by kibernetik » Tue Sep 24, 2019 6:33 pm

I understood your post as a question.
If this is a syntax suggestion, then thank you for the suggestion.

Post Reply