Envie mensagens e arquivos para qualquer usuário do WhatsApp direto da linha de comando.
// Hurricane | idlagam.com CLS // HB_FSETDATETIME( <cFile>, [<dDate> | <tDateTime>] [, <cTime>] ) // --> lSuccess // changing file date and time //? HB_FSETDATETIME('acbr.log', DATE()+1, '11:05:14' ) //? HB_FSETDATETIME( 'acbr.log' ) // assigns current date and time //? HB_FSETDATETIME('acbr.log', , '11:05:13' ) // assumes current date ? HB_FSETDATETIME('acbr.log', DATE()-2 ) // assumes current time
// querying file date and time dDate:=nil cTime:=nil ? hb_fGetDateTime('acbr.log', @dDate, @cTime) ? dDate, cTime
hb32\contrib\hbutil. To compile:
hbmk2 test1.prg hbutil.hbc
1 - Variable declaration and automatic initialization
LOCAL | STATIC | PUBLIC | PRIVATE <var, ...> AS <TYPE>
// Extended commands (override) // Declare and initialize variables LOCAL nPos(1), nSize AS INTEGER LOCAL nPrice, nTotal(3) AS MONEY // nPrice:=0.00, nTotal:=0.000 LOCAL tDat1, tToday(), tDat3 AS TIMESTAMP LOCAL dDat1, dToday(), dDat3 AS DATE // dDat1:=CTOD(''), dToday:=DATE() LOCAL lStart, lEnd AS LOGICAL LOCAL hItem AS HASH LOCAL aTypes[3], aItems AS ARRAY // Harbour native (just declare variables) LOCAL oBrw AS CLASS TBROWSE LOCAL oCol, oGet, oPrn AS OBJECT LOCAL bInit, bAction AS BLOCK CLS ? ' LOGICAL', lStart, lEnd // .F. .F. ? 'INTEGER (N)', nPos, nSize // 0 0 ? ' MONEY (N)', nPrice, nTotal // 0.00 0.000 ? ' TIMESTAMP', tDat1 // / / 00:00:00.000 ? ' ', tToday // 06/18/25 14:38:09.398 ? ' ', tDat3 // / / 00:00:00.000 ? ' DATE', dDat1, dDat3 // / / / / ? ' ', dToday // 06/18/25 ? oBrw, oCol, bInit // NIL NIL NIL // HBUtil: Extended commands PRIVATE dVar1, dVar2() AS DATE ? 'PRIVATE', dVar1, dVar2 // / / 06/18/25
2 - VALIDATE PARAMETERS: FUNCTION | METHOD
5 implementation suggestions
(I implemented the first 4)
1 - Declaration & initialization. Syntax:
LOCAL | STATIC | PUBLIC | PRIVATE <var, ...> AS <TYPE> // <TYPE> = ARRAY, CHARACTER, DATE, HASH, LOGICAL, MEMO, NUMERIC, TIMESTAMP // artificial: CHAR, INTEGER, DECIMAL, MONEY
features:
2 - Runtime parameter validation (functions and methods) . Syntax:
Envie mensagens e arquivos para qualquer usuário do WhatsApp direto da linha de comando.