Alternative to PUT value INTO variable
Moderator: Klaus
Re: Alternative to PUT value INTO variable
Heh. How about "==="?
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Alternative to PUT value INTO variable
I'm on board if we can nest them like parentheses in LISP.

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Alternative to PUT value INTO variable
Myself, I can't wait till we see them introduce this symbol ~
(<>.(<>.,<>)>.,<>)
(<>.(<>.,<>)>.,<>)

-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Alternative to PUT value INTO variable
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
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Alternative to PUT value INTO variable
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.
... 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/
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Alternative to PUT value INTO variable
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 ~
or even
<sigh> 
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 ""


-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Alternative to PUT value INTO variable
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.bogs wrote: ↑Wed Jan 16, 2019 10:42 pmI 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<sigh>Code: Select all
set the value of tmp1 and tmp2 and tmp3 to ""
![]()
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Alternative to PUT value INTO variable
Yah, was already thinking along those lines, but good to have confirmation 

