PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Reason
  • Correction
  • Example
  • Using a 2-byte Integer counter
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
Information 37: Optimize your FOR loop
Reason
The code of your FOR loop use a counter whose type is:
  • 2-byte int
  • 4-byte real
Correction
Use an Integer counter or a Real counter.
Example

Using a 2-byte Integer counter

Code triggering the information message
I is 2-byte int
FOR I = 1 TO 5
        ListAdd(LIST_List1,"Element "+I)
END
Possible correction
Use an Integer counter.
I is int
FOR I = 1 TO 5
        ListAdd(LIST_List1,"Element "+I)
END
Minimum required version
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment