Skip to content
XoPro
  • XoPro
    • Xojo
    • Xojo MVPs
    • XOJO.CONNECT

July 1, 2019 Anthony G. Cyphers
Imported
No Comments

TT’s generic programming guidelines

Declare your local variables close to where they’re used

Do not declare all your variables at the top. Instead, declare them where you use them first. That makes it easier to see their type and also leads to better locality, avoiding accidental use of stale (old) values.

Bad style:

var i as integer
var item as FileReference
var files() as FileReference
Source: Thomas Tempelmann

Tags: api2
  • Copyright © 2019 XoPro
  • Theme by Zidithemes