Comments on Gargoyle's code



Dim $SO,$Re ,$R, $S, $J
; Dimming variables is a good practice
; Potential issues:
; A.) No issues in small one off scripts
; B.) In a large script single letter variables can be difficult to manage

$SO=SETOPTION("Explicit", "ON")
$SO=SETOPTION("NoMacrosInStrings", "ON")
$SO=SETOPTION("NoVarsInStrings", "ON")
$SO=SETOPTION("WrapAtEOL", "ON")
BREAK ON
; Setting options is a good practice
; Most admins would rather not have BREAK ON for a Logon script, using
If Not @LogonMode
Break On
EndIf
; As recently posted, used by Witto would appear to be a good practice as well


; Semi personal preference but single quotes ' would go within double quotes "
; My own preference has been to now use the single for most scripting
; However again this is not necessarilly a Best Practice more so than a preference
; Knowing that single within double is the key point to remeber when coding more
; complex scripts where needed.

$R = ReadValue("HKCU\Software\Golfing","Round1")

$S = Split($R,"|")

$J = Join($S," ")

; Using CHR(20) or similar as needed is another option/choice when dealing with complex scripting


Edited by NTDOC (2006-09-23 12:30 AM)