Alternative to PUT value INTO variable

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2820
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Alternative to PUT value INTO variable

Post by mwieder » Tue Sep 25, 2018 3:00 am

Heh. How about "==="?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6786
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Alternative to PUT value INTO variable

Post by FourthWorld » Tue Sep 25, 2018 7:35 am

mwieder wrote:
Tue Sep 25, 2018 3:00 am
Heh. How about "==="?
I'm on board if we can nest them like parentheses in LISP. ;)
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 3698
Joined: Sat Feb 25, 2017 10:45 pm

Re: Alternative to PUT value INTO variable

Post by bogs » Tue Sep 25, 2018 6:12 pm

Myself, I can't wait till we see them introduce this symbol ~
(<>.(<>.,<>)>.,<>)
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6786
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Alternative to PUT value INTO variable

Post by FourthWorld » Tue Sep 25, 2018 6:54 pm

bogs wrote:
Tue Sep 25, 2018 6:12 pm
Myself, I can't wait till we see them introduce this symbol ~
(<>.(<>.,<>)>.,<>)
Now you're talking. But maybe we can spice it up with required white space that changes the meaning of the statement if you change the placement of a space character, as folks enjoy with Python. ;)
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2820
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Alternative to PUT value INTO variable

Post by mwieder » Tue Sep 25, 2018 7:45 pm

Yah, that's the one thing that bugs me about python programming. But a good IDE will enforce proper indentation to help keep you out of trouble.



... and don't forget ruby's spaceship operator (<=>). It's actually a very useful operator, and one that would help solve a lot of the numeric/string comparisons in LC.

Code: Select all

https://subvisual.co/blog/posts/90-ruby-bits-br-spaceship-operator/

bogs
Posts: 3698
Joined: Sat Feb 25, 2017 10:45 pm

Re: Alternative to PUT value INTO variable

Post by bogs » Tue Sep 25, 2018 9:02 pm

mwieder wrote:
Tue Sep 25, 2018 7:45 pm
ruby's spaceship operator (<=>)
Don't forget the Conan operator ( cssssss{|;;;;;;;;;;;;;;;;;;;> ) which makes sushi out of your code in any language :D
Image

bogs
Posts: 3698
Joined: Sat Feb 25, 2017 10:45 pm

Re: Alternative to PUT value INTO variable

Post by bogs » Wed Jan 16, 2019 10:42 pm

I was doodling around today and had to reset a number of variables manually to "". I was thinking how nice it would be in this one use-case to be able to do that just by writing something like ~

Code: Select all

put "" into (tmp1) and (tmp2) and (tmp3) and...

or even

Code: Select all

set the value of tmp1 and tmp2 and tmp3 to ""
<sigh> :mrgreen:
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6786
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Alternative to PUT value INTO variable

Post by FourthWorld » Wed Jan 16, 2019 10:57 pm

bogs wrote:
Wed Jan 16, 2019 10:42 pm
I was doodling around today and had to reset a number of variables manually to "". I was thinking how nice it would be in this one use-case to be able to do that just by writing something like ~

Code: Select all

put "" into (tmp1) and (tmp2) and (tmp3) and...

or even

Code: Select all

set the value of tmp1 and tmp2 and tmp3 to ""
<sigh> :mrgreen:
Such a large number of variables handled uniformly suggests a good case for an array, where emptying all of its slots is an even shorter one-liner.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 3698
Joined: Sat Feb 25, 2017 10:45 pm

Re: Alternative to PUT value INTO variable

Post by bogs » Thu Jan 17, 2019 12:02 am

Yah, was already thinking along those lines, but good to have confirmation :D
Image

Post Reply

Return to “Feature Requests”