Information générale
Catégorie:
Fonctions Windows API
Versions des environnements
Hello,
you cannot use the constants at runtime since they only have a meaning at compilation time.
I would use one of these approaches:
1. store the parameter value in numerical form (field type int) directly into the table (saves table space and performance is the best you can get)
the only disadvantage is that you have to manually do some math to fill the table
2. store the parameter value in a 3 byte long character field with abbreviations for the possible alignment settings
e.g. C = Center, R = right, B = break, (Left is default)
CR = center+break
then write a simple udf
FUNCTION EncodeTextAlignment(lcAlign)
LOCAL lnAlign
lnAlign = 0
IF "C" $ lcAlign
lnAlign = TEXT_CENTER
ENDIF
IF "R" $ lcAlign
lnAlign = lnAlign + TEXT_RIGHT
ENDIF
IF "B" $ lcAlign
lnAlign = lnAlign + TEXT_BREAK
ENDIF
RETURN lnAlign
ENDFUNC
and call your UDF instead of EVAL, VAL ..
Regards
Christian
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement