PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Reason
  • Correction
  • Example
  • Extracting the first character of the string
Products
WINDEVWEBDEV - Server codeWEBDEV - Browser codeWINDEV MobileReports and Queries
Platforms
WindowsLinuxWindows MobileUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple Watch
Languages
JavaPHPAjaxUser code (UMC)External language
Databases
HFSQLHFSQL Client/ServerStored proceduresOLE DBODBCNative Accesses
Error 531: The negative or null subscripts are not allowed
Reason
You are using the operators for string extraction ([[ or ]]). The extraction subscript for a WLanguage string always starts from 1: the subscript of the fist character is set to 1.
Correction
Modify the value specified for the extraction subscript.
Example

Extracting the first character of the string

Code triggering the error
sString is string = "WEBDEV is great"
Trace(sString[[0]])
Possible correction
Replace 0 by 1 (first character of the string).
sString is string = "WEBDEV is great"
Trace(sString[[1]])
Minimum version required
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment