[FIXED] Bug with Dereference Operator

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
admin
Site Admin
Posts: 67299
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug with Dereference Operator

Post by admin »

" left side "...

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Bug with Dereference Operator

Post by bdeshi »

Yes, but set, unset does this without a right side!
...Consistency...
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67299
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug with Dereference Operator

Post by admin »

1) This thread showed a real bug: $str = '$str'.1; ... does not work as expected.

2) I added a line. Might help.

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Dereference Operator

Post by PeterH »

admin wrote:" left side "...
Do you want to say this implies that a right side (i.e. the init value) *must* exist?

1) I wouldn't think so just from the wording
2) that would make it rather unusable, as globals/perms are to be used in different (sub-)-routines, but if you set a global in one, and try to "read" it in another routine, you must overwrite it (in defining it global) before it can be read.

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Dereference Operator

Post by PeterH »

admin wrote:1) This thread showed a real bug: $str = '$str'.1; ... does not work as expected.

2) I added a line. Might help.
Ah - me again. But I was just trying to make it short :oops:

Correct would be:

Code: Select all

 $nr = 1;
 $str = '$str'.$nr;
 Global *$str;
"Böse Falle" that the concenating dot was interpreted as decimal dot :cry:

admin
Site Admin
Posts: 67299
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug with Dereference Operator

Post by admin »

Well, try next version. (No note in change log)

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Dereference Operator

Post by PeterH »

admin wrote:Well, try next version. (No note in change log)
Thanks - will have a look :D

admin
Site Admin
Posts: 67299
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug with Dereference Operator

Post by admin »

PeterH wrote: Global *$str;[/code]"Böse Falle" that the concenating dot was interpreted as decimal dot :cry:
Yes. Fixed in next beta.

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Dereference Operator

Post by PeterH »

admin wrote:
PeterH wrote:"Böse Falle" that the concenating dot was interpreted as decimal dot :cry:
Yes. Fixed in next beta.
This is one of the rare times a bug is "nearly acceptable* :lol:
In '$a'.1 the dot *could* be interpreted as decimal dot. So I didn't report this as a bug.
But correct: here the meaning of a concatenation dot should take precedence about the meaning of a decimal dot :whistle:

So thanks again!
(And eager to test :roll: )

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Dereference Operator

Post by PeterH »

Tested new beta: very fine! :appl: :appl: :appl:
In:

Code: Select all

 $str = '$str'.1;
 Global *$str;
not only the last line works now, but also the first.

So: all at it's best :D
Big thanks, and more :ball:

Will go to use it in real world coding now :whistle:

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: [FIXED] Bug with Dereference Operator

Post by bdeshi »

Thanks from here too! Very helpful.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply