> Bob S wrote:
> There is already a string keyword.
>
True. ‘Stringify()’ or ‘’evaluateAsString()’
It’s easy enough to write a function to force string comparisons for those rare
edge cases like "6. " is equal to "6.” where the engine automatically converts
the strings to numbers.
Yes.
Bob S
> On Sep 6, 2018, at 13:07 , Richmond Mathewson via use-livecode
> wrote:
>
> I wonder is the reason "6" and "6." are treated as the same is because "6."
> is read as "6.0"?
>
> Late to the party, I know . . .
>
> Richmond.
___
There is already a string keyword.
Bob S
> On Sep 6, 2018, at 21:53 , Jim Lambert via use-livecode
> wrote:
>
>
>> RichardG wrote:
>> Any suggestions for a new operator token to specify numeric equivalence?
>
> Or maybe to specify string equivalence.
>
>> Did anyone know that "6. " is
Hi
We had the same "problem" in Foxpro because of the Dbase legacy.
Here is a partial list of comparisosn with the SET EXACT switch
setting
OFF ON OFF or ON
"abc" = "abc" Yes Yes Yes -- 1
"ab" = "abc" No No No -- 2
"abc" = "ab" Yes No No -- 3
"abc" = "ab_"
> RichardG wrote:
> Any suggestions for a new operator token to specify numeric equivalence?
Or maybe to specify string equivalence.
> Did anyone know that "6. " is equal to "6."???
string( "6. “) is not equal to string( "6.”)
where the function string() would tell LC not to try to
Mike Kerner wrote:
I like the is vs = idea.
Me too, but I'm afraid decades of code across the entire xTalk world
form a substantial enough legacy to render the change prohibitive.
Any suggestions for a new operator token to specify numeric equivalence?
--
Richard Gaskin
Fourth World
Bob Sneidar wrote:
> Yes, but it's the kind of thing that can bite a new programmer in the
> butt.
HyperTalk had a reputation for being difficult to learn. ;)
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
"bite a new programmer in the butt" . . . well, as a person who was a
new programmer in 1975 and found
things very difficult to understand at first (FORTRAN IV) I certainly
don't remember having a sore bottom!
I do know, that is numerical calculations empty spaces are exactly that:
empty
I wonder is the reason "6" and "6." are treated as the same is because
"6." is read as "6.0"?
Late to the party, I know . . .
Richmond.
On 6/9/2018 10:34 pm, Jim Lambert via use-livecode wrote:
Did anyone know that "6. " is equal to "6."???
It’s somewhat similar to
value(“h “) is
Yes, but it's the kind of thing that can bite a new programmer in the butt. And
the trouble with your comparison is that length("7. ") IS equal to length("6.
"). So multiple comparisons have to be made. But this is an edge case I admit.
I was only trying to maintain an index number for a
> Did anyone know that "6. " is equal to "6."???
It’s somewhat similar to
value(“h “) is equal to value(“h”),
while
“h “ is not equal to “h”.
I’m not disturbed but appreciative that the engine tries to convert both sides
to numbers when doing a comparison. Just must remember
I like the is vs = idea. I disagree with Paul that this is a price of it
being typeless. No other whitespace character in LC seems to cause this
behavior. It's not really true that it's typeless e.g. a blob (even though
technically a blob is a type). It's just that the typing is implied and
I have come across this before . I think what I encountered was "" = 0
I had to do a workaround, figured it was a a decision based on other engine
factors.
I can see it being ok in 99% of cases.
On Thu, Sep 6, 2018 at 1:25 PM Mike Kerner via use-livecode <
use-livecode@lists.runrev.com>
Ignoring the leading or trailing whitespace is weird and counterintuitive.
If the language was more perfect, I think it would first not ignore the
other characters in the string no matter what they look like, then do the
implicit type coercion and then the comparison, even though there are
On 9/6/2018 11:46 AM, Bob Sneidar via use-livecode wrote:
> Did anyone know that "6. " is equal to "6."???
>
> THAT is disturbing! So now we have to check the length of a string as well to
> make sure there is an exact match???
>
This is the price of having a &
By way of rehtoric, and by no means a suggestion of any change in the engine,
it might have been better if "is" did a strict string comparison, while "=" or
"is equal to" attempted a numerical type conversion, and reverted to a string
comparison if either arguement failed.
What *might* be
On 2018-09-06 18:52, Mike Kerner via use-livecode wrote:
Right. If the explanation is clear then it's not an issue (even if it
is a
little weird - "6.abc"="6.xyz" is false but "6." is "6." is
true)
Well the explanation can be fixed :)
Its hard to say whether the language would be better or
Right. If the explanation is clear then it's not an issue (even if it is a
little weird - "6.abc"="6.xyz" is false but "6." is "6." is true)
On Thu, Sep 6, 2018 at 12:43 PM Mark Waddingham via use-livecode <
use-livecode@lists.runrev.com> wrote:
> On 2018-09-06 18:21, Mark Wieder via
On 2018-09-06 18:21, Mark Wieder via use-livecode wrote:
Yeah. IMO automatic type conversion is one of the failure points of
the xtalk paradigm, but it's always been thus.
To be fair, in the days of HyperCard when everything was strings (and
numbers were decimal strings) the rules worked
On 2018-09-06 18:14, Mike Kerner via use-livecode wrote:
Dictionary:
First, if you look in the operands, it says
*The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources of value,
including arrays.*
The example for comparing two
On 09/06/2018 09:06 AM, Mark Waddingham via use-livecode wrote:
P.S. The engine has *always* worked like this - as have xTalks in
general. It's why you never have to put any explicit type conversion
anywhere when you are interchanging anything and things still work as
expected.
Yeah. IMO
so the description seems to imply that the comparison should be as strings
if double-quotes are included around the literals.
On Thu, Sep 6, 2018 at 12:14 PM Mike Kerner
wrote:
> Dictionary:
> First, if you look in the operands, it says
> *The operands value1 and value2 can be numbers, literal
Dictionary:
First, if you look in the operands, it says
*The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources of value,
including arrays.*
The example for comparing two strings is
"ABC" = "abc" -- true if and only if
On 2018-09-06 18:02, Mike Kerner via use-livecode wrote:
dictionary says when comparing strings we go char by char, and says
that
quotes around the literal causes it to be evaluated as a string.
Where in the dictionary? That should be revised.
Quotes make no difference - numbers and strings
; various microorganisms that can cause diseases. Print and hand out at own
>>> risk. Unsolicited distribution of this mail is prohibited.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>&g
contain various microorganisms that can cause diseases. Print and hand out
>> at own risk. Unsolicited distribution of this mail is prohibited.
>>
>>
>>
>>
>>
>>
>>
>> > 06. sep. 2018 kl. 17:46 skrev Bob Sneidar via use-livecode <
>&g
;>
>>
>>
>>
>>
>>
>>
>>> 06. sep. 2018 kl. 17:46 skrev Bob Sneidar via use-livecode <
>> use-livecode@lists.runrev.com>:
>>>
>>> Did anyone know that "6. " is equal to "6."???
>>>
>>>
vecode@lists.runrev.com>:
> >
> > Did anyone know that "6. " is equal to "6."???
> >
> > THAT is disturbing! So now we have to check the length of a string as
> well to make sure there is an exact match???
> >
> > Bob S
> >
&g
wow. that's not cool. I just tried "is" and yep. is.
On Thu, Sep 6, 2018 at 11:47 AM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:
> Did anyone know that "6. " is equal to "6."???
>
> THAT is disturbing! So now we have to c
ode
> :
>
> Did anyone know that "6. " is equal to "6."???
>
> THAT is disturbing! So now we have to check the length of a string as well to
> make sure there is an exact match???
>
> Bob S
>
>
> __
Did anyone know that "6. " is equal to "6."???
THAT is disturbing! So now we have to check the length of a string as well to
make sure there is an exact match???
Bob S
___
use-livecode mailing list
use-livecode@lists.runrev.com
P
Again, and no implied disrespect to the developers who I believe have been
doing a bang up job, I have not started using V7 for production work yet. I
keep a V6.7 stack file as my development file, and if I want to play around in
V7 I save as a different stack file.
Bob S
On Dec 3, 2014,
Bob:
that makes good sense. Unfortunately, I’ve done a lot of work with V7 and so
far it hasn’t let me down, especially after the last 3 releases of 7.0.1 have
fixed a couple of problems I had. Fortunately, I had quite a bit of lead time
for my application, but now I’ve got to get a beta out by
According to the LC Dictionary, ‘go’ should have done what you want.
When going to a previously-unopened stack, if you don't specify a card, the
go command displays the first card of the stack. If the stack is already
open, the current card of the stack appears and the stack window is
Graham,
Thanks for checking this. I'm working in lcv7.0, on Mavericks. I'll retest.
Sometimes LC needs to be restarted to get things working right. Unfortunately,
V7.0.1 ( rc2) crashes on one of my operations, so I'm using v7.0, which crashes
on quit. Oh well, hope it gets fixed next release.
Grahan:
Ok, after I restarted my computer and relaunched LC, all worked as expected.
Thanks for responding and assuring me that it’s supposed to work the way I want.
Best,
Bill
On Dec 3, 2014, at 3:00 AM, Graham Samuel livf...@mac.com wrote:
According to the LC Dictionary, ‘go’ should have done
Lock messages
Go cd 1 of stack mySubStack as palette
Unlock messages
Or have I misunderstood?
Hugh Senior
FLCo
Folks:
I want to open a second window in my app. The window in the calling stack
is
the first card of a substack named ?myCallingSubstack?. I want to go to
the
first card of a
Hugh:
Thanks. I just wanted a second normal window. But, it does work correctly.
Don’t know why my test version messed up, but when I came in in the morning,
all was working.
Best,
Bill
On Dec 3, 2014, at 12:58 PM, FlexibleLearning.com ad...@flexiblelearning.com
wrote:
Lock messages
Go cd 1
Folks:
I want to open a second window in my app. The window in the calling stack is
the first card of a substack named “myCallingSubstack”. I want to go to the
first card of a substack named “mySubstack”. When I do
go to stack “mySubstack”, the new windows sits behind the calling
39 matches
Mail list logo