Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A couple of potential bugs
#3
(11-01-2022, 06:49 PM)johnno1956 Wrote: As to why the results seem to be 'reversed', cleverer people than I, would have to answer that one... But, just to point out a slight 'quirk' with Naalaa, as compared to most 'Basics', the 'right' command string index starts at zero. Most Basic's index start at one. I do not believe that this will fix your problem... I suppose it would just be FYI...  I hope that you get the answer you are looking for...

Just to make sure I understand.  Even if zero based, if you have:

s = right("abcdefghi", 2)

What would you expect s to be?

The 2 right-most characters would (to me at least) be "hi".

But if I run:
s = right("abcdefghi", 2)
wln(s)

I get: "cdefghi" - which is the right-most 7 characters.  Hmm.  Does right(s, n) start at n - counting from 0 from the left?
"a" is in position 0, "b" is in position 1, and "c" is in position 2.
Ok, maybe that is what it is doing.

So maybe not a bug, just the old "nut behind the wheel" Smile
Reply


Messages In This Thread
A couple of potential bugs - by eddavis - 11-01-2022, 05:11 PM
RE: A couple of potential bugs - by johnno1956 - 11-01-2022, 06:49 PM
RE: A couple of potential bugs - by eddavis - 11-01-2022, 07:02 PM
RE: A couple of potential bugs - by Marcus - 11-03-2022, 05:48 AM
RE: A couple of potential bugs - by Marcus - 11-05-2022, 04:30 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)