Patch level :2.1 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento :spostati gli ALX generici in include (step 1) git-svn-id: svn://10.65.10.50/trunk@12241 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ed595d7575
commit
b6a48cfabe
23
include/alex.alx
Executable file
23
include/alex.alx
Executable file
@ -0,0 +1,23 @@
|
||||
: 2DROP ( n1 n2 -- )
|
||||
DROP DROP
|
||||
;
|
||||
|
||||
: 2DUP ( n1 n2 -- n1 n2 n1 n2 )
|
||||
OVER OVER
|
||||
;
|
||||
|
||||
: NIP ( n1 n2 -- n2 )
|
||||
SWAP DROP
|
||||
;
|
||||
|
||||
: -ROT ( n1 n2 n3 -- n3 n1 n2 )
|
||||
ROT ROT
|
||||
;
|
||||
|
||||
: TUCK ( n1 n2 -- n2 n1 n2 )
|
||||
SWAP OVER
|
||||
;
|
||||
|
||||
: INCR ( a1 -- )
|
||||
1 SWAP +!
|
||||
;
|
182
include/report.alx
Executable file
182
include/report.alx
Executable file
@ -0,0 +1,182 @@
|
||||
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
||||
\ Funzioni di aiuto per implementazione messaggi
|
||||
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
||||
|
||||
: REP_GET_POS.X ( f1 -- n1 )
|
||||
GET_POS DROP
|
||||
;
|
||||
|
||||
: REP_GET_POS.Y ( f1 -- n1 )
|
||||
GET_POS NIP
|
||||
;
|
||||
|
||||
: REP_GET_SIZE.X ( f1 -- n1 )
|
||||
GET_POS DROP
|
||||
;
|
||||
|
||||
: REP_GET_SIZE.Y ( f1 -- n1 )
|
||||
GET_SIZE NIP
|
||||
;
|
||||
|
||||
: REP_GET_BOTTOM ( f1 -- n1 )
|
||||
DUP
|
||||
REP_GET_POS.Y
|
||||
SWAP
|
||||
REP_GET_SIZE.Y
|
||||
+
|
||||
;
|
||||
|
||||
: REP_OFFSET_FIELD_POS.X ( n1 -- )
|
||||
#THIS REP_GET_POS.X \ Legge posizione x
|
||||
+ \ La incrementa di n1
|
||||
#THIS REP_GET_POS.Y \ Legge posizione y
|
||||
#THIS SET_POS \ Aggiorna posizione
|
||||
;
|
||||
|
||||
: REP_OFFSET_FIELD_POS.Y ( n1 -- )
|
||||
#THIS REP_GET_POS.Y \ Legge posizione y
|
||||
+ \ La incrementa di n1
|
||||
#THIS REP_GET_POS.X \ Legge posizione x
|
||||
SWAP \ Scambia le coordinate
|
||||
#THIS SET_POS \ Aggiorna posizione
|
||||
;
|
||||
|
||||
: REP_MESSAGE_ALIGN_BOTTOM ( f1 -- )
|
||||
REP_GET_BOTTOM \ Calcola fondo di f1
|
||||
#THIS REP_GET_BOTTOM \ Calcola fondo del campo corrente
|
||||
- \ Calcola offset come differenza dei due
|
||||
REP_OFFSET_FIELD_POS.Y \ Incrementa posizione y del campo corrente
|
||||
;
|
||||
|
||||
: REP_MESSAGE_ALIGN_TOP ( f1 -- )
|
||||
REP_GET_POS.Y \ Legge posizione y del capo f1
|
||||
#THIS REP_GET_POS.X \ Legge posizione x del campo corrente
|
||||
SWAP \ Scambia le coordinate
|
||||
#THIS SET_POS \ Aggiorna posizione del campo corrente
|
||||
;
|
||||
|
||||
: REP_MESSAGE_ALIGN_CENTER ( f1 -- )
|
||||
REP_GET_BOTTOM \ Calcola fondo del campo f1
|
||||
#THIS REP_GET_BOTTOM \ Calcola fondo del campo corrente
|
||||
- 2 / \ Calcola offset verticale
|
||||
REP_OFFSET_FIELD_POS.Y \ Aggiorna posizione del campo corrente
|
||||
;
|
||||
|
||||
: REP_FIELD_NOT_NULL ( f1 -- f1 b1 )
|
||||
SP
|
||||
;
|
||||
|
||||
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
||||
\ Implementazione dei vari messaggi standard
|
||||
\ f1 campo o sezione del report
|
||||
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
||||
|
||||
: MESSAGE_ADD ( f1 -- )
|
||||
#THIS @ \ Leggo il valore del campo corrente
|
||||
SWAP +! \ Incrementa f1 col contenuto del campo corrente
|
||||
;
|
||||
|
||||
: MESSAGE_ALIGN ( s1 f1 -- )
|
||||
SWAP \ Porta su il tipo di allineamento (BOTTOM)
|
||||
"REP_MESSAGE_ALIGN_" SWAP + \ Si crea il nome della funzione da chiamare
|
||||
PERFORM \ Chiama ad esempio DO_MESSAGE_ALIGN_BOTTOM, ecc...
|
||||
;
|
||||
|
||||
: MESSAGE_APPEND ( f1 -- )
|
||||
#THIS @ \ Leggo il valore del campo corrente
|
||||
DUP EMPTY= \ Controlla se e' vuoto
|
||||
IF
|
||||
DROP \ Scarta il valore nullo
|
||||
DROP \ Scarta f1
|
||||
ELSE
|
||||
" " \ Inserisco uno spazio
|
||||
SWAP
|
||||
+ \ Sommo uno spazio all'inizio della stringa
|
||||
SWAP \ Riporto in primo piano f1
|
||||
+! \ Incrementa f1 col contenuto della stringa
|
||||
THEN
|
||||
;
|
||||
|
||||
: MESSAGE_COPY ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui prametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
#THIS @ SWAP ! \ Copia il campo corrente
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_DEBUG ( NULL -- )
|
||||
MON \ Attiva il fantastico debugger
|
||||
;
|
||||
|
||||
: MESSAGE_DISABLE ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui prametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
DISABLE \ Report defined word
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_ENABLE ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui parametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
ENABLE \ Report defined word
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_HIDE ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui prametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
HIDE \ Report defined word
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_INCR ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui prametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
INCR \ Native word
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_ISAMREAD ( s1 s2 n1 -- )
|
||||
ISAM_READ
|
||||
;
|
||||
|
||||
: MESSAGE_PAGENO ( -- ) \ Numero di pagina corrente
|
||||
#REPORT.PAGE @ \ Leggo il numero di pagina
|
||||
#THIS ! \ Setto il campo corrente col numero
|
||||
;
|
||||
|
||||
: MESSAGE_RESET ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui prametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
NULL SWAP ! \ Azzera campo
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_SHOW ( f1 ... fn -- )
|
||||
BEGIN \ Ciclo sui prametri
|
||||
REP_FIELD_NOT_NULL
|
||||
WHILE
|
||||
SHOW \ Report defined word
|
||||
REPEAT
|
||||
;
|
||||
|
||||
: MESSAGE_SUB ( f1 -- )
|
||||
#THIS @ \ Leggo il campo corrente
|
||||
-1 * \ Lo cambio di segno
|
||||
SWAP +! \ Decrementa f1 col contenuto del campo corrente
|
||||
;
|
||||
|
||||
: MESSAGE_TABLEREAD ( s1 s2 s3 -- )
|
||||
TABLE_READ
|
||||
;
|
||||
|
||||
: MESSAGE_TODAY ( -- ) \ Data odierna
|
||||
#SYSTEM.DATE @ \ Leggo la data
|
||||
#THIS ! \ Setto il campo corrente con la data
|
||||
;
|
Loading…
x
Reference in New Issue
Block a user