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$="Goodbye"
> 15 asum=0
> 20 FOR a=1 TO LEN(a$): asum=asum+CODE(a)
> 40 SELect ON asum
> 50   = 255: REMark ASCII Code sum for "Hello"
> 51          PRINT "Hello World"
> 60   = 364: REMark ASCII sum for "Goodbye"
> 61          PRINT "Goodbye World"
> 70 END SELect
>

ooGyebd = Goodbye
goodbye <> Goodbye



-- 
Dave Park
d...@sinclairql.com
_______________________________________________
QL-Users Mailing List

Reply via email to