ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / 
  • Default value
  • Cross-platform code
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Warning
This type of variable is kept for backward compatibility.
The Pascal string of type corresponds to a length-prefixed string (this length is stored as a byte value). This byte is not accessible. For example string[1] represents the first character of the string and not its length.
The length of a Pascal string cannot exceed 255 characters. The length given to the Pascal string must be equal to the length of the string.
Remarks:
  • This type is available for compatibility with other programming languages (e.g., Turbo Pascal for Windows).
  • Universal Windows 10 AppAndroidAndroid Widget The Pascal String type is not supported. It is replaced with the String type.
  • For a variable of type "Pascal string of", TypeVar returns the wlPascalString constant (value: 21).
Example
FirstName is Pascal string of 8
FirstName = "Florence"
Syntax

Declaring and initializing a "Pascal string of" variable Hide the details

<Variable name> is Pascal string of <Length> = <Value>
OR

<Variable name> is Pascal string of <Length>
<Variable name> = <Value>
<Variable name>:
Name of the variable to declare. When several variables of the same type are declared and initialized on the same line, only the last variable is initialized.
<Length>:
Length set for the string. It must be equal to the length of the string.
<Value>:
Value given to the variable.
Remarks

Default value

A declared and uninitialized "Pascal string of" variable corresponds to an empty string ("").
Universal Windows 10 AppAndroidAndroid Widget

Cross-platform code

Fixed-length strings are not available in Java. They are replaced with the String type at runtime.
However, Complete can be used on a String variable:
MyString is string
MyString = Complete("Test", 10)
// Equivalent to 
// MyString is fixed string of 10 characters
// MyString = "Test"
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/29/2024

Send a report | Local help