Re: [Ql-Users] Select on

2020-06-21 Thread pjwitte via Ql-Users
On 21/06/2020 13:38, Bob Spelten via Ql-Users wrote: Op Sun, 21 Jun 2020 09:46:23 +0200 schreef Norman Dunbar via Ql-Users : I have a vague recollection that Simon N Goodwin did something similar, maybe, in the DIY Toolkit. I think it was passed a variable and a list of strings, and returne

Re: [Ql-Users] Select on

2020-06-21 Thread Michael Bulford via Ql-Users
If we are talking about Selecting on single-character strings, such as when coding actions depending on some keypress, I would like to tell you about how I get around this problem. At the very beginning, I would declare some constants of the codes of all the alphabetical characters, all 52 of th

Re: [Ql-Users] Select on

2020-06-21 Thread Michael Bulford via Ql-Users
If we are talking about Selecting on single-character strings, such as when coding actions depending on some keypress, I would like to tell you about how I get around this problem.  At the very beginning, I would declare some constants of the codes of all the alphabetical characters, all 52 of

Re: [Ql-Users] Select on

2020-06-21 Thread Tobias Fröschle via Ql-Users
That's probably the best solution for the problem - String$ SELECT has always been a half-baked solution in SuperBASIC. Tobias > Am 21.06.2020 um 13:38 schrieb Bob Spelten via Ql-Users > : > > Op Sun, 21 Jun 2020 09:46:23 +0200 schreef Norman Dunbar via Ql-Users > : > >> I have a vague recol

Re: [Ql-Users] Select on

2020-06-21 Thread Bob Spelten via Ql-Users
Op Sun, 21 Jun 2020 09:46:23 +0200 schreef Norman Dunbar via Ql-Users : I have a vague recollection that Simon N Goodwin did something similar, maybe, in the DIY Toolkit. I think it was passed a variable and a list of strings, and returned the position of the variable in the list. Somethi

Re: [Ql-Users] Select on

2020-06-21 Thread Norman Dunbar via Ql-Users
I have a vague recollection that Simon N Goodwin did something similar, maybe, in the DIY Toolkit. I think it was passed a variable and a list of strings, and returned the position of the variable in the list. Something like that. Maybe useful? Cheers, Norm. -- Sent from my Android device wit

Re: [Ql-Users] Select on

2020-06-20 Thread Giorgio Garabello via Ql-Users
I have already tried roughly all the various solutions and obviously we know very well that they are solutions they don't really know satisfaction. I also speak from the readability point of view, when you have to get your hands by modifying the code written years before or written by other nested

Re: [Ql-Users] Select on

2020-06-20 Thread pjwitte via Ql-Users
On 20/06/2020 17:00, Jan Bredenbeek via Ql-Users wrote: Op za 20 jun. 2020 14:01 schreef Dave Park via Ql-Users < ql-users@lists.q-v-d.com>: ooGyebd = Goodbye goodbye <> Goodbye Use a hash algorithm like CRC-16 or CRC-32? ;-) Thats probably the fastest solution so far :o) Maybe overkill for

Re: [Ql-Users] Select on

2020-06-20 Thread Jan Bredenbeek via Ql-Users
Op za 20 jun. 2020 14:01 schreef Dave Park via Ql-Users < ql-users@lists.q-v-d.com>: > > > > ooGyebd = Goodbye > goodbye <> Goodbye > > Use a hash algorithm like CRC-16 or CRC-32? ;-) Jan ___ QL-Users Mailing List

Re: [Ql-Users] Select on

2020-06-20 Thread Dave Park via Ql-Users
On Sat, Jun 20, 2020 at 3:03 AM Derek Stewart via Ql-Users < ql-users@lists.q-v-d.com> wrote: > Hi, > > Here is my un-subtle attempt, how about summing the ASCII codes for the > character string to be selected and use SELect ON to select the option > based on the sum total, for example: > > 10 a$=

Re: [Ql-Users] Select on

2020-06-20 Thread Derek Stewart via Ql-Users
Hi, Here is my un-subtle attempt, how about summing the ASCII codes for the character string to be selected and use SELect ON to select the option based on the sum total, for example: 10 a$="Goodbye" 15 asum=0 20 FOR a=1 TO LEN(a$): asum=asum+CODE(a) 40 SELect ON asum 50 = 255: REMark ASCII

Re: [Ql-Users] Select on

2020-06-19 Thread pjwitte via Ql-Users
On 19/06/2020 20:02, Daniel Baum via Ql-Users wrote: What about doing something like this. In languages like c# the equivalent of the "select on: command is hardly ever used and if .. else if ... else is much more common: 100 INPUT a$ 110 IF a$="a" THEN 115 PRINT "hello a" 120 ELSE 130 I

Re: [Ql-Users] Select on

2020-06-19 Thread Daniel Baum via Ql-Users
What about doing something like this. In languages like c# the equivalent of the "select on: command is hardly ever used and if .. else if ... else is much more common: 100 INPUT a$ 110 IF a$="a" THEN 115 PRINT "hello a" 120 ELSE 130 IF a$="b" 135 PRINT "hello b" 150 ELSE 155

Re: [Ql-Users] Select on

2020-06-19 Thread Giorgio Garabello via Ql-Users
For that I think it is easier to implement a new instruction (even an external extension) instead of modifying the current instruction. Il giorno ven 19 giu 2020 alle ore 12:19 pjwitte via Ql-Users < ql-users@lists.q-v-d.com> ha scritto: > On 19/06/2020 10:52, Giorgio Garabello via Ql-Users wrot

Re: [Ql-Users] Select on

2020-06-19 Thread pjwitte via Ql-Users
On 19/06/2020 10:52, Giorgio Garabello via Ql-Users wrote: "SELect ON" instruction I find it has a major flaw that will not allow you to manage alphanumeric variables, I unfortunately don't know the assemly Would someone be available to create an extension similar to SELECT (e.g. SELECT $) capa

[Ql-Users] Select on

2020-06-19 Thread Giorgio Garabello via Ql-Users
"SELect ON" instruction I find it has a major flaw that will not allow you to manage alphanumeric variables, I unfortunately don't know the assemly Would someone be available to create an extension similar to SELECT (e.g. SELECT $) capable of handling strings? I understand that it is not simple ..