Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:46 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : extension SELECT CASE

Author Message
georgestheking
Newbie

Joined: 21/12/2021
Location: Belgium
Posts: 26
Posted: 09:24am 24 Sep 2024
Copy link to clipboard 
Print this post

Hi,

Another standard function missing is SELECT / CASE.
Will be nice also.

Best regards

Georges
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 09:47am 24 Sep 2024
Copy link to clipboard 
Print this post

PicoMiteVGA User Manual Page 97
  Quote  
SELECT CASE value
CASE testexp [[, testexp] …]
<statements>
<statements>
CASE ELSE
<statements>
<statements>
END SELECT

Executes one of several groups of statements, depending on the value of an
expression. 'value' is the expression to be tested. It can be a number or
string variable or a complex expression.
'testexp' is the value that is to be compared against. It can be:
 A single expression (i.e. 34, "string" or PIN(4)*5) to which it may
equal
 A range of values in the form of two single expressions separated by
the keyword "TO" (i.e. 5 TO 9 or "aa" TO "cc")
 A comparison starting with the keyword "IS" (which is optional). For
example: IS > 5, IS <= 10.
When a number of test expressions (separated by commas) are used the
CASE statement will be true if any one of these tests evaluates to true.
If 'value' cannot be matched with a 'testexp' it will be automatically matched
to the CASE ELSE. If CASE ELSE is not present the program will not
execute any <statements> and continue with the code following the END
SELECT. When a match is made the <statements> following the CASE
statement will be executed until END SELECT or another CASE is
encountered when the program will then continue with the code following
the END SELECT.
An unlimited number of CASE statements can be used but there must be
only one CASE ELSE and that should be the last before the END SELECT.
Example:
SELECT CASE nbr%
CASE 4, 9, 22, 33 TO 88
statements
CASE IS < 4, IS > 88, 5 TO 8
statements
CASE ELSE
statements
END SELECT
Each SELECT CASE must have one and one only matching END SELECT
statement. Any number of SELECT…CASE statements can be nested
inside the CASE statements of other SELECT…CASE statements

what exactly are you missing?
'no comment
 
georgestheking
Newbie

Joined: 21/12/2021
Location: Belgium
Posts: 26
Posted: 10:28am 24 Sep 2024
Copy link to clipboard 
Print this post

Hi,

I see nothing in the PICOMITE 5.08 Manual but it work.

Best regards
Tanks

Georges
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:19pm 24 Sep 2024
Copy link to clipboard 
Print this post

  georgestheking said  I see nothing in the PICOMITE 5.08 Manual but it work.



PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024