Assigning multiple variable with one command

User avatar
rbytes
Posts: 1808
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
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 » Wed Aug 22, 2018 2:43 am

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,
####### Living the colorful life #######

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

Re: Assigning multiple variable with one command

Post by Mr. Kibernetik » Wed Aug 22, 2018 3:00 am

In smart BASIC there are no such commands.

They are in SPL.

User avatar
Dutchman
Posts: 855
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 » Wed Aug 22, 2018 9:33 am

It could be done with READ ;)
We consider it a refreshing mental exercise to figure out ways to circumvent foolishness (Quote from Richard)

User avatar
rbytes
Posts: 1808
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
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 » Thu Aug 23, 2018 7:44 pm

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
####### Living the colorful life #######

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

Re: Assigning multiple variable with one command

Post by Mr. Kibernetik » Fri Aug 24, 2018 1:51 am

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: 1808
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
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 » Tue Sep 11, 2018 9:20 pm

That is a lot of users. But I didn't see anyone but me posting SPL programs on the Forum.
####### Living the colorful life #######

User avatar
Dutchman
Posts: 855
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 » Wed Sep 12, 2018 8:15 am

Perhaps because SPL is not as simple as the name indicates :lol:
We consider it a refreshing mental exercise to figure out ways to circumvent foolishness (Quote from Richard)

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

Re: Assigning multiple variable with one command

Post by Mr. Kibernetik » Wed Sep 12, 2018 2:38 pm

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: 855
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 » Thu Sep 13, 2018 8:21 am

OK. I doubted between "Simple" and "Shorthand" :D
We consider it a refreshing mental exercise to figure out ways to circumvent foolishness (Quote from Richard)

Henko
Posts: 780
Joined: Tue Apr 09, 2013 12:23 pm
Flag: Netherlands

Re: Assigning multiple variable with one command

Post by Henko » Thu Sep 13, 2018 9:20 am

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