Search found 2762 matches

by PeterH
12 Aug 2023 12:30
Forum: Wishes
Topic: Dereference opereator in interpolation
Replies: 12
Views: 544

Re: Dereference opereator in interpolation

OK: a bit strange as for one '*' there can be several substitutions. There *can* be situations where it is negative - but I think more are positive. And I can think of no situation where I have a dereferenced variable containing another var name, i.e. where it would happen unexpected. So I would say...
by PeterH
12 Aug 2023 12:17
Forum: Wishes
Topic: Dereference opereator in interpolation
Replies: 12
Views: 544

Re: Dereference opereator in interpolation

To be true - I didn't really expect it. But if you don't ask...

OK: I'll be the first to test it :mrgreen:
(Just to say: I'm the user using <<<#>>> for heredoc)

Thanks!
by PeterH
11 Aug 2023 23:57
Forum: Wishes
Topic: Dereference opereator in interpolation
Replies: 12
Views: 544

Dereference opereator in interpolation

The dereference operator defines a restriction not to be used in interpolation, i.e. in heredoc and in double quotes. Is there a good reason for this? As it means that every time you need a deref. variable in heredoc or quotes, you must first copy it to a temp- (or dummy-)var, and refer to that in t...
by PeterH
08 Aug 2023 12:46
Forum: Bug Reports
Topic: [solved] array-elements in quotes not resolved
Replies: 3
Views: 205

Re: array-elements in quotes not resolved

And now: tested test & prod scripts: :tup: :tup:

Thanks again!
by PeterH
08 Aug 2023 11:18
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

Re: Problems with dereferenced access to array-elements

Thanks for the good explanation :appl: Still I don't know why the function sees the array (this is a must), while the step dialog doesn't. I'd say it's important that it's an array, and only "by the way" it also has a 'base' var. For me it's "not expected". But I can live with th...
by PeterH
07 Aug 2023 23:11
Forum: Bug Reports
Topic: [solved] array-elements in quotes not resolved
Replies: 3
Views: 205

[solved] array-elements in quotes not resolved

Please say multiple "Oh no!" - I did. So exec the included script, as is, and note the comments. (Problem only on elements with index = characters) You remember my un-answered questions about adding associate elements to an indexed array? You and I would not have thought of this answer, so...
by PeterH
07 Aug 2023 20:07
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

Re: Problems with dereferenced access to array-elements

OK: I misunderstood that the function definition should specify the []. (So I wrote that the function doesn't know it before being called.) But it's the parm in the call . That relaxes a lot. But if $a is non-array, and $a[] is array, it's strange that the function sees vartype($p3) as 'array' if ca...
by PeterH
07 Aug 2023 15:58
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

Re: Problems with dereferenced access to array-elements

Isn't this a bit of syntax mismatch :?: For explode() + implode() the array variable is defined to *not* have [] For array() it defines that both is allowed And now you say there's a difference between $a and $a[]. :shock: Problem for me: *the caller* decides, if a parm is string or array - the scri...
by PeterH
07 Aug 2023 13:29
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

Re: Problems with dereferenced access to array-elements

First *test* shows: this problem is solved! Before trying in productive script: Report a follow-up problem! (It was there before your change - I didn't want to mix it up :whistle: ) See following example-script: if executed in stepping mode, the call to f() will only report 3 parms - the 4th is tota...
by PeterH
07 Aug 2023 11:58
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

Re: Problems with dereferenced access to array-elements

If I interpret it right it is exact what I meant = wanted! :tup:

OK: when you're ready with *everything* else, you could add the logic with () :whistle:

edit: typo
by PeterH
07 Aug 2023 11:36
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

Re: Problems with dereferenced access to array-elements

Fortunatually you're going to fix it :D

Waiting ... can't get on till then. :cup:
Bad that I'm always doing things for the first time :oops:
by PeterH
07 Aug 2023 00:21
Forum: Bug Reports
Topic: [solved] Problems with dereferenced access to array-elements
Replies: 12
Views: 417

[solved] Problems with dereferenced access to array-elements

OK: short version. Assume: $p contains the variable-name '$A3' of an array. For both: $ele2 = *$p[2]; // copy 1 element of array *$p[2] = 'X2'; // set 1 element of array *$p[2] could be interpreted 2 ways, I demonstrate them with (): (*$p)[2] or *($p[2]) I'd expect (and wish) the first version - as ...
by PeterH
04 Aug 2023 17:19
Forum: Bug Reports
Topic: ForEach on array with dereferenced variable
Replies: 4
Views: 221

Re: ForEach on array with dereferenced variable

Now it's later. (Much!)

After fixing my own :bug: :bug: :bug: ( :oops: )
I could verify: this :bug: is fixed, too!

So thanks again!