PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Label code
  • Limits of labels
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
GOTO statement
In french: GOTO
The GOTO statement is used to run a code identified by a given label.
Important: The label and the GOTO statement must necessarily be defined in the same process.
Versions 16 and later
Universal Windows 10 App This feature is available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This feature is available for the Windows Phone applications.
Universal Windows 10 App This feature is available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This feature is available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is available for the iPhone/iPad applications.
iPhone/iPad This feature is available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This feature is available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This feature is available in Windows Store apps mode.
Universal Windows 10 App This feature is available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Example
Res = fOpen(FileName, foWrite)
IF Res = -1 THEN GOTO ERROPEN
Res = fWrite(Res, "Process OK")
IF Res = -1 THEN GOTO ERRWRITE
...
RESULT True
ERROPEN:
Info("The file " + FileName + " cannot be opened. Check its existence.")
RESULT False
ERRWRITE:
Info("Unable to write into " + FileName)
RESULT False
Syntax
GOTO <Label name>
...
<Label name>:
<Label code>
<GOTO>:
Runs the code identified by the label.
<Label name>:
Name of label whose code must be run. This name must be followed by ":". This label and the GOTO statement must be found in the same process.
<Label code>:
Code that must be run when GOTO calls the label.
Remarks

Label code

Once the code of the label has been run, the program runs the code lines that directly follow the label.

Limits of labels

  • Several labels with the same name cannot be used in the same process (or procedure).
  • A warning is displayed during the compilation of the project if a label is used by no GOTO statement.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment