Code: Select all
on openStack
put 42 into ADAMS
put 69 into KLAUS
end openStack

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on openStack
put 42 into ADAMS
put 69 into KLAUS
end openStack
It does no such thing, you silly goose. It creates and fills 2 variables -richmond62 wrote: ↑Sat Apr 18, 2020 12:17 pmMy, admittedly goofy, previous posting featured constants masquerading as variables.
Code: Select all
put 42 into ADAMS
put 69 into KLAUS
Well . . . if I'm the goose, what does that make you?you silly goose
Um... no
I'd say your picture is quite accurate...GOOSE
No, it is not even close. Those two variables can be changed at any time you feel like it. A constant is just that, constant. Pi is a constant. You can not change Pi just because you feel they got it wrong. You can't change it by adding whipped cream either.richmond62 wrote: ↑Sat Apr 18, 2020 1:33 pmCreating and filling 2 variables every time a stack is launched is de facto the same as establishing 2 constants,
Yes, HOWEVER....richmond62 wrote: ↑Sat Apr 18, 2020 1:46 pmThe question is, can a programmer set new constants in LiveCode other than those inherent in the language?
Lc Dictionary wrote: Once you have defined a constant, you cannot redefine it in the same handler; doing so causes an execution error.
Well, your half right, it is a container after all, and you *can* put variables into it, however it is not a variable in and of itself, as the name explicitly states, it is a property. If you set the visible of (control x) to false, you are setting a property, not entering a variable. While the word 'Red' *could* be used in a variable, if an object is 'Red', that is a part and parcel of said object, therefore a 'property'.richmond62 wrote: ↑Sat Apr 18, 2020 1:46 pmA custom property can also be judged as a container holding a variable.
I try not to be a slave to others opinionsrichmond62 wrote: ↑Sat Apr 18, 2020 1:46 pmI don't know which cultural tradition you come from bogs, but all the traditions I am aware of
do not view foxes positively.
Not much of a spanner, I'm sure you read it, now go back and read it again until comprehension sinks in.richmond62 wrote: ↑Sat Apr 18, 2020 1:46 pmOh, and let's chuck another spanner in the works:
https://en.wikipedia.org/wiki/Control_variable
Code: Select all
Put 42 into tVar
Sure you can, as long as you name them something unique. And I know a great way to do this:The question is, can a programmer set new constants in LiveCode other than those inherent in the language?
Code: Select all
on mouseUp
set the doublePi of this stack to "6.28"
end mouseUp
Well, that phrasing might do with an update, say to:A value that has a name, like a variable, but that doesn't change.
So "pi", or my favorite, "empty", are constants. "42", however beloved by most of the more advanced members of this forum, is an integer, and if assigned a name, it is a variable."A value that has a name, like a variable, but is native to LC, and cannot change."
Code: Select all
put pi into tVar
Code: Select all
put 42 into tVar