Search found 2771 matches

by PeterH
08 Jul 2023 00:37
Forum: Bug Reports
Topic: Undefined element of (assoc) array shown as 'string'
Replies: 5
Views: 239

Undefined element of (assoc) array shown as 'string'

I'd expect vartype() to show an undefined element of an (associative) array as 'undefined'. But it's shown as 'string'. To repro (see following script): - Array $GAf[] is undefined - Define it by setting one element "c" to 0 - now check any other (non-existing) element by VarType(): it's s...
by PeterH
22 Jun 2023 17:23
Forum: Bug Reports
Topic: [fixed] Error on arrays while creating or assigning some vars
Replies: 8
Views: 272

Re: Error on arrays while creating or assigning some vars

Thanks! Saw the beta :appl:

Will test this evening...
by PeterH
22 Jun 2023 15:22
Forum: Bug Reports
Topic: [fixed] Error on arrays while creating or assigning some vars
Replies: 8
Views: 272

Re: Error on arrays while creating or assigning some vars

In short?
After an unset-stmt (on an array and a string) defining array-vars by setting an element, or just setting elements, change (these or other) elements.
Without the unset they don't.
by PeterH
22 Jun 2023 14:34
Forum: Bug Reports
Topic: [fixed] Error on arrays while creating or assigning some vars
Replies: 8
Views: 272

Re: Error on arrays while creating or assigning some vars

Seems I got closer, seems you *could* not really find it :mrgreen: Following script when executed shows the wrong result: §agnr = "ALL CMDS", must be =0 Comment out the UnSet stmt, retry: it's correct! If no bug iin XY - I convince: no risk in script! :maf: //$ "Test" $tcmdl = <<...
by PeterH
22 Jun 2023 13:27
Forum: Bug Reports
Topic: [fixed] Error on arrays while creating or assigning some vars
Replies: 8
Views: 272

Re: Error on arrays while creating or assigning some vars

OK - I'll try to play a bit, maybe with using some other array before doing the stmt in question.

And I had an impression as if (maybe) another strange thing with an array happened. So lets go!

(The script isn't short - but it seems in the end it will mostly contain debug lines :whistle: )
by PeterH
22 Jun 2023 12:34
Forum: Bug Reports
Topic: [fixed] Error on arrays while creating or assigning some vars
Replies: 8
Views: 272

[fixed] Error on arrays while creating or assigning some vars

A copy of 4 stmts of a real script: $tcmdlf[$nbrcmd + 1] = 999; // to define all (prev) elements as '' (and mark end-of-array) $debugl = ""; // D E B U G D E B U G D E B U G D E B U G D E B U G echo "El. 0-4 = $tcmdlf[0] - $tcmdlf[1] - $tcmdlf[2] - $tcmdlf[3] - $tcmdlf[4]"; // D...
by PeterH
19 Jun 2023 19:47
Forum: Tips & Tricks, Questions & Answers
Topic: Question to InputSelect() style=1024
Replies: 5
Views: 303

Re: Question to InputSelect() style=1024

Sorry for being late! In the moment I'm trying to do as much as I can only by the data I've generated. And I'm also trying to create "kind of dialogs" with inputselect(). Before I just related on the line number as return - but this is hard if there are not only lines with lists of command...
by PeterH
17 Jun 2023 19:59
Forum: Tips & Tricks, Questions & Answers
Topic: Question to InputSelect() style=1024
Replies: 5
Views: 303

Re: Question to InputSelect() style=1024

Hi jupe, thanks for the idea! First I thought to "cheat" this way is bad - if e.g. someone copies such a text and wonders about the strange way that pipe works. But then I noticed that you can't (yet) copy text from inputselect-display :whistle: So I think I'll try this, if no other idea w...
by PeterH
17 Jun 2023 12:55
Forum: Wishes
Topic: Wish for a Sub that shares it's vars with the caller
Replies: 2
Views: 183

Re: Wish for a Sub that shares it's vars with the caller

Sad to hear, but half expected. Don't know VBA. In XY it's like sub, but without creating a new environment, i.e. a new level of variables. (That's why it seems so siimple...) OK: this means a lot more work, a lot more planning, and maybe in the end let plans be too diffiicult. I'll see. Have a nice...
by PeterH
17 Jun 2023 00:34
Forum: Tips & Tricks, Questions & Answers
Topic: Question to InputSelect() style=1024
Replies: 5
Views: 303

Question to InputSelect() style=1024

I started successfully to use InputSelect() with style=1024 to specify a line like OperandName|13.2 where OperandName is the name of an operand, and 13.2 is a code for "what to display" when selected, i.e. operand 2 of command 13. Now an operand is [separator="|"] :veryconfused: ...
by PeterH
16 Jun 2023 12:52
Forum: Wishes
Topic: Wish for a Sub that shares it's vars with the caller
Replies: 2
Views: 183

Wish for a Sub that shares it's vars with the caller

(I dare to ask. Who asks can lose, who doesn't has lost.) (And, at chance, you just have heared what's it good for :whistle: ) Often in a script I have the need for the same logic in different places. In "general" that's where you use a function. *But:* often this code is connected to the...
by PeterH
16 Jun 2023 11:52
Forum: Wishes
Topic: Easier access of scripting command syntaxes
Replies: 10
Views: 3551

Re: Easier access of scripting command syntaxes

Seeing this picture I had to laugh :lol: It looks very like what I'm working on. :party: (No wonder, it shows output by InputSelect().) But it's: - generated, there's a script to generate a current basic data file - can show all commands on a general level (much like your picture) - can be searched ...
by PeterH
15 Jun 2023 12:09
Forum: Bug Reports
Topic: [fixed] Bug in foreach
Replies: 4
Views: 222

Re: [fixed] Bug in foreach

Thanks again: the bug is gone! And thanks for the demonstration :biggrin: That's why I often mock around for "simple, clear and unique logic"! (Though I didn't do here.) ForEach(array) says (array as variable), while ForEach(list) says (variable, list) From the first moment I saw this I th...
by PeterH
15 Jun 2023 00:35
Forum: Bug Reports
Topic: [fixed] Bug in foreach
Replies: 4
Views: 222

[fixed] Bug in foreach

Is it just me? Working with arrays *is* problem :masked: The following code is kind of "super-compressed" from real code. 1) a ForEach() with an array. OK 2) behind that an unrelated ForEach with a list. Abend = :bug: ! Delete 1st foreach, or skip it (incl it's continue): 2nd ForEach is OK...