UUID (from server) source code:
https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/uuid.prg
__pp_addRule( hPP, "#xcommand ? [<explist,...>] => AP_RPuts( '<br>' [,<explist>] )" )
__pp_addRule( hPP, "#xcommand ?? [<explist,...>] => AP_RPuts( [<explist>] )" )
__pp_addRule( hPP, "#define CRLF hb_OsNewLine()" )
__pp_addRule( hPP, "#xcommand TEXT <into:TO,INTO> <v> => #pragma __cstream|<v>:=%s" )
__pp_addRule( hPP, "#xcommand TEXT <into:TO,INTO> <v> ADDITIVE => #pragma __cstream|<v>+=%s" )
__pp_addRule( hPP, "#xcommand TEMPLATE [ USING <x> ] [ PARAMS [<v1>] [,<vn>] ] => " + ;
'#pragma __cstream | AP_RPuts( InlinePrg( %s, [@<x>] [,<(v1)>][+","+<(vn)>] [, @<v1>][, @<vn>] ) )' )
__pp_addRule( hPP, "#xcommand BLOCKS [ PARAMS [<v1>] [,<vn>] ] => " + ;
'#pragma __cstream | AP_RPuts( ReplaceBlocks( %s, "{{", "}}" [,<(v1)>][+","+<(vn)>] [, @<v1>][, @<vn>] ) )' )
__pp_addRule( hPP, "#command ENDTEMPLATE => #pragma __endtext" )
function ReplaceBlocks( cCode, cStartBlock, cEndBlock, cParams, ... )
local nStart, nEnd, cBlock
local lReplaced := .F.
hb_default( @cStartBlock, "{{" )
hb_default( @cEndBlock, "}}" )
hb_default( @cParams, "" )
while ( nStart := At( cStartBlock, cCode ) ) != 0 .and. ;
( nEnd := At( cEndBlock, cCode ) ) != 0
cBlock = SubStr( cCode, nStart + Len( cStartBlock ), nEnd - nStart - Len( cEndBlock ) )
cCode = SubStr( cCode, 1, nStart - 1 ) + ;
ValToChar( Eval( &( "{ |" + cParams + "| " + cBlock + " }" ), ... ) ) + ;
SubStr( cCode, nEnd + Len( cEndBlock ) )
lReplaced = .T.
end
return If( HB_PIsByRef( 1 ), lReplaced, cCode )
Function Main()
LOCAL nome_utente
use "data" shared new readonly alias infos
set order to tag CODICE
nome_utente = ""
seek "test"
if found()
nome_utente = alltrim(infos->NOME)
endif
use
sessionsave(nome_utente) <----
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 48 guests