All variables start with "$" and may contain one or more underscores "_".
Examples:

Variables

[color=#aa0000]
$_iCounter
$sStringVar1
$s_String_Var_1
$g__sStringVar1
$g_sStringVar_1[/color]

MsgBox Constants
 
[color=#aa0000]$MB_SYSTEMMODAL
$MB_ICONWARNING[/color]


Here is a code snippet, with common variable constellations.

--------------------------------------------------------
Global $g_sFilePath  = @ScriptDir & '\Testdateien'
Global $g_iKeepFiles = 5
Global $g_aFileList[0]

DeleteOldestFiles($g_sFilePath, $g_iKeepFiles, "*.zip")

Func DeleteOldestFiles($_sFolderPath, $_iNumberOfFilesToKeep, $_sFileMask =
"*")

  Local $iDateMode              = $FT_MODIFIED ; 0 = $FT_MODIFIED (Standard), 1 
=
$FT_CREATED, 2 = $FT_ACCESSED
  Local $iFileCount   = 0
  Local $sFileList    = ""
  Local $hFiles       = 0
  Local $iIdx         = 0
  Local $iRet         = 0

  If Not FileExists($_sFolderPath) Then
      MsgBox($MB_SYSTEMMODAL + $MB_ICONWARNING, "FileQuantityLimit    Error", _
        "Folder does not exist:  ''" & $_sFolderPath & "''      ")
     Exit
  EndIf
--------------------------------------------------------

Bernd.

-- 
<https://forum.pspad.com/read.php?2,72964,73028>
PSPad freeware editor https://www.pspad.com

Odpovedet emailem