Assigning multiple variable with one command

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Assigning multiple variable with one command

Post by rbytes »

Mr. K, a while back you showed me an example of assigning multiple variables to the same value in one command line. I have forgotten. What is the format for that?

I tried:

A = B = C = 0
A, B, C = 0

But they don't work, they just give syntax errors. But I recall it was something like that,
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4782
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Assigning multiple variable with one command

Post by Mr. Kibernetik »

In smart BASIC there are no such commands.

They are in SPL.

User avatar
Dutchman
Posts: 848
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Assigning multiple variable with one command

Post by Dutchman »

It could be done with READ ;)

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Assigning multiple variable with one command

Post by rbytes »

Thanks. I do use READ. That was just a false memory of SB from the time I was learning SPL. Multiple variable setting was a handy little SPL feature, but it seemed I was the only one learning SPL, so I am back with Smart Basic. :D
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4782
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Assigning multiple variable with one command

Post by Mr. Kibernetik »

rbytes wrote:
Thu Aug 23, 2018 7:44 pm
but it seemed I was the only one learning SPL
There are more than 100 users of SPL right now... :)

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Assigning multiple variable with one command

Post by rbytes »

That is a lot of users. But I didn't see anyone but me posting SPL programs on the Forum.
The only thing that gets me down is gravity...

User avatar
Dutchman
Posts: 848
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Assigning multiple variable with one command

Post by Dutchman »

Perhaps because SPL is not as simple as the name indicates :lol:

User avatar
Mr. Kibernetik
Site Admin
Posts: 4782
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Assigning multiple variable with one command

Post by Mr. Kibernetik »

Dutchman wrote:
Wed Sep 12, 2018 8:15 am
Perhaps because SPL is not as simple as the name indicates :lol:
SPL is "Smart Programmimg Language"

User avatar
Dutchman
Posts: 848
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Assigning multiple variable with one command

Post by Dutchman »

OK. I doubted between "Simple" and "Shorthand" :D

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Assigning multiple variable with one command

Post by Henko »

There is a list with programming languages on internet. I counted about 700 of them. And SmartBasic and SPL are not even on that list.

Post Reply