PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Reason
  • Correction
  • Example
  • Using a 2-byte Integer counter
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
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
This page is also available for…
Comments
Click [Add] to post a comment