This udf design thing was already intended(?) by cj (at least I made all my external udf after this convention since then)goes something like this (sample from DeltaTime())
code:
;FUNCTION DeltaTime()
;
;AUTHOR Jochen Polster (jochen.polster@gmx.net)
;
;ACTION Calculates the time difference between two given times
;
;SYNTAX DeltaTime(Start,End)
;
;PARAMETERS Start (Required)
; - String value representing the starttime
; Format hh:mm:ss[:ms]
;
; End (Required)
; - String value representing the ending time
; Format hh:mm:ss[:ms]
;
;REMARKS Highest possible delta Value is 23:59:59:999 !
; If the diff gets higher , the result will be incorrect.
;
;RETURNS The difference between Start - and Endtime in 'hh:mm:ss[:ms]'
;
;DEPENDENCIES None
;
;EXAMPLES call "PATH\DeltaTime.udf"
; $start = @time + ':' + @msecs
; for $i = 0 to 15000
; $ = @scriptdir
; next
; $end = @time + ':' + @msecs
; ? 'Start time : $start' ?
; ? 'End time : $end' ?
; $Duration = DeltaTime($start,$end)
; ? 'Duration : $Duration' ? ?
;
; $start = "21:59:59" ? 'Backup Started : $start' ?
; $end = "01:00:01" ? 'Backup Ended : $end' ?
; $d = DeltaTime($start,$end)
; ? 'Backup Duration : $d' ?
;
; get $k
Plus we should have an udf-internal-variables convention , maybe just like Richard once used :
udf internal starts with $__ or something like that
J.