Please enable JavaScript to view this site.

Vensim Help

Cancel is used as a signal that the current screen should not be read.  Normally, before any command is executed, Vensim will attempt to read any inputs the user might have made and issue an error message if unable to do so.  By using the CANCEL command, this action will be prevented, allowing the user to continue without incorporating the changes made in the screen.  For example:

:SCREEN TEST

TEXTONLY,"Final Time",1,16,0,0,L

MODVAR,"FINAL TIME",20,16,10,0,L,[80|100]

BUTTON,"Simulate",25,45,0,0,C,,MENU>RUN,RESULT

BUTTON,"Cancel",75,45,0,0,C,,CANCEL,MAIN

In this case entering a bad number in the MODVAR field will prevent the "Simulate" button from working, but the "Cancel" button will simply ignore the input and return to MAIN.