Use of CASE ... OF ... ENDOF ... ENDCASE

nnCron and nnCron LITE discussion

Use of CASE ... OF ... ENDOF ... ENDCASE

Postby tolosan » Thu, 24 Nov 2005, 05:40

The Help says :
<value_on_stack>
CASE

<a possible_value> OF action (value on stack equals the possible value) ENDOF
\ ...

DUP OF <a possible_value> OF action (value on stack equals none of the possible values) ENDOF
ENDCASE


How to put a value on the stack ?

I want to test a variable though.

Thanks for your help.
tolosan
 
Posts: 4
Joined: Thu, 24 Nov 2005, 05:34

Postby Valery_Kondakoff » Thu, 24 Nov 2005, 11:10

http://www.nncron.ru/help/EN/working/nncron_forth.htm

Just open the nnCron Forth Console (nnCron tray icon right-click-Tools-Console) for some experimenting.
CU
VK
User avatar
Valery_Kondakoff
Site Admin
 
Posts: 769
Joined: Thu, 01 Jul 2004, 20:49
Location: Moscow, Russia

Postby tolosan » Fri, 25 Nov 2005, 04:41

I've understood the principle of the stack of NNCRON.

Thanks
tolosan
 
Posts: 4
Joined: Thu, 24 Nov 2005, 05:34


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest

cron