Re: Use of A4GL_DEFDECPREC

Alain Siverly <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
A4GL_DEFDECPREC is allways set to 255.

1. test:

rm $VRUN/p_1test.4ae (in $VRUN we have the programs compiled
with "m")

rm ./1test.4ae (this is the local program as a result of
4glc and 4glpc)

./1test_comp (which uses: 4glc -G ./g_1test.4gl; 4glpc -V5
-o 1test.4ae ./g_1test.4gl ./p_1test.4gl)

./1test.4ae

result: OK

2. test:

rm $VRUN/p_1test.4ae

rm ./1test.4ae

m (compiles and put the program in $VRUN)

p (runs the program from $VRUN)

result: OK (probably because using the same glb than before)

3. test:

rm $VRUN/p_1test.4ae

rm ./1test.4ae

m -c ( which is "make clean " and deletes the glb)

m (now creating a new glb)

p (runs the program from $VRUN)

result: not good

diff glb-file-fom-test1 glb-file-from-test3: "Binary files
/e/as/g_1test.glb.dat and g_1test.glb.dat differ"

(i attached the actual files after some little changes)

Thanks in advance!

Alain Siverly

VENTAS AG

Aufsichtsratsvorsitzender: Dr. Olaf Rehme Am 11.02.14 12:02,
schrieb Mike Aubury:

Just delete all the .glb.dat files and they should
get recreated..

If the newly created on also has the same issue - it might
be that you have that DECPREC set to 2 (or "not" 255 somewhere
whilst its compiling)

On 11 February 2014 10:44, Alain
Siverly <[email protected] >
wrote:

thank you for testing. we tried now some different
things.

if we use this for compile the test programm:

4glc -G ./g_1test.4gl

4glpc -V5 -o 1test.4ae ./g_1test.4gl ./p_1test.4gl

then we get correct results.

but if we compile using our typical tools like "m -c ;
m" then we get the wrong results. it seems that the glb
file ist different in both cases and this makes the
difference. but i don't know well how the glb file is
build so i cannot recognize the cause.

alain

VENTAS AG 20+ Jahre ERP-Erfahrung!
Web: www.ventas.de
Fon: 040 / 32 33 34 0
Fax: 040 / 32 33 34 38
Firmensitz: Mittelweg 144, 20148 Hamburg, Deutschland
Registergericht: Hamburg, HRB 80 297 Ust.IdNr.: DE118686712
Vorstandsvorsitzender: Dipl. Ing. Alain Siverly
Aufsichtsratsvorsitzender: Dr. Olaf Rehme

Am 11.02.14 09:26, schrieb Mike Aubury:

When I run it here - I get :

decimal_16:
0.16666666666666670000000

float_1 = decimal_16:
0.16666666666666670000000

decimal_16 nach float_return:
0.16666666666666670000000

r_vpos.evk_pe_dm nach float_return:
0.16666666666666670000000

r_vpos.evk_pe_dm = decimal_16:
0.16666666666666670000000

float_1 :
0.16666666666666670000000

decimal_16 = float_1:
0.16666666666666670000000

Make sure you have no old .glb.dat files
hanging around ?

On 11 February 2014
08:17, Alain Siverly <[email protected] >
wrote:

Hi,

we have a last problem using the
environment variable A4GL_DEFDECPREC=255.

All things runs very well with one
exception:

Using a global definition file which is
referenced in the upper part of a 4gl
file, then decimal(16) get rounded to two
decimal numbers.

Since we use this almost in every file it
would be great to get a correction.

Please find attached:

testTable.sql -> Definition of the
Table "vpos" (1 column DECIMAL(16)

g_1test.4gl -> Global file (defines a
RECORD LIKE "r_vpos")

p_1test.4gl -> the 4gl file for
testing. The output of the example is as
comment in the beginning of the file.

Thank you very much in advance!

Alain Siverly

VENTAS AG

(The VDC 2 is comming soon...!)

------------------------------------------------------------------------------

Android apps run on BlackBerry 10

Introducing the new BlackBerry 10.2.1 Runtime
for Android apps.

Now with support for Jelly Bean, Bluetooth,
Mapview and more.

Get your Android app in front of a whole new
audience. Start now.

http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk

_______________________________________________

Aubit4gl-discuss mailing list

[email protected]

https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
1test_comp (text/plain, 77 B)
 4glc -G ./g_1test.4gl; 4glpc -V5 -o 1test.4ae  ./g_1test.4gl ./p_1test.4gl
g_1test.4gl (text/plain, 83 B)
--!SCHEMA vmain_vdb
--!GLOBALS

DEFINE r_vpos RECORD LIKE vpos.*

--!END GLOBALS
L_1test (text/plain, 85 B)
$V4GL/g_schema.4gl
$V4GL/einmalig/1test/g_1test.4gl
$V4GL/einmalig/1test/p_1test.4gl
make_1test (text/plain, 5.3 KB)
BUILDDIR=$(VMAKE)
FORMS=
LIBS=
FGLOBJS=
MIFS=
OTHOBJS=
OBJS_CFORMS=
GLOBALS=
GLOBALS_DEFS=
A4GL_UI=CONSOLE
export A4GL_UI
ALL4GLSRC=
ALLPERSRC=
A4GL_PACKER:=$(shell aubit-config A4GL_PACKER)
A4GL_FRM_BASE_EXT:=$(shell aubit-config A4GL_FRM_BASE_EXT)
A4GL_PACKED_EXT:=$(shell aubit-config A4GL_PACKED_EXT)
A4GL_XML_EXT:=$(shell aubit-config A4GL_XML_EXT)
A4GL_EXE_EXT:=$(shell aubit-config A4GL_EXE_EXT)
A4GL_FORMTYPE:=$(shell aubit-config A4GL_FORMTYPE)
A4GL_HELP_EXT:=$(shell aubit-config A4GL_HELP_EXT)
A4GL_OBJ_EXT:=$(shell aubit-config A4GL_OBJ_EXT)
A4GL_LEXDIALECT:=$(shell aubit-config A4GL_LEXDIALECT)
A4GL_LEXTYPE:=$(shell aubit-config A4GL_LEXTYPE)
A4GL_C_COMP=ccache gcc
export A4GL_C_COMP
A4GL_EXE_PREFIX=p_
export A4GL_EXE_PREFIX
A4GL_USE_FORMXML=Y
export A4GL_USE_FORMXML
LFILE_DIR=$(V4GL)/einmalig/1test
export LFILE_DIR
LFILE_DIR_NOT_EXPANDED=$$V4GL/einmalig/1test
export LFILE_DIR_NOT_EXPANDED
A4GL_PROGNAME=1test
export A4GL_PROGNAME
ifeq "$(A4GL_LINTSTYLE)" ""
 A4GL_LINTSTYLE=XML
 export A4GL_LINTSTYLE
endif
ifeq "$(A4GL_LEXDIALECT)" "POSTGRES"
 A4GL_EC_EXT=.cpc
else
 A4GL_EC_EXT=.ec
endif

FCOMPILE=fcompile
ifeq "$(A4GL_FORMTYPE)" "GENERIC"
 ifeq "$(A4GL_PACKER)" "PACKED"
  A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)$(A4GL_PACKED_EXT)
 endif
 ifeq "$(A4GL_PACKER)" "GZPACKED"
  A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)$(A4GL_PACKED_EXT).gz
 endif
 ifeq "$(A4GL_PACKER)" "XML"
  A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)$(A4GL_XML_EXT)
 endif

 ifeq "$(A4GL_USE_FORMXML)" "Y"
  A4GL_FULL_FORM_EXT=.xml
  FCOMPILE=A4GL_PACKER=FORMXML fcompile
 endif
else
 A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)
endif

ifeq  "$(A4GL_LINTFILE)" ""
 A4GL_LINTFILE=lint_1test.xml
 export A4GL_LINTFILE
endif
all: compile


ALL4GLSRC+=$(V4GL)/einmalig/1test/g_1test.4gl
GLOBALS+=$(V4GL)/einmalig/1test/g_1test.4gl
GLOBALS_DEFS+=$(V4GL)/einmalig/1test/g_1test.glb.dat
# g_1test not in library - need to use it instead
FGLOBJS+=$(BUILDDIR)/g_1test$(A4GL_OBJ_EXT)
MIFS+=$(BUILDDIR)/g_1test.mif
ALL4GLSRC+=$(V4GL)/g_schema.4gl
GLOBALS+=$(V4GL)/g_schema.4gl
GLOBALS_DEFS+=$(V4GL)/g_schema.glb.dat
# g_schema should be in a library instead
MIFS+=$(BUILDDIR)/g_schema.mif
# p_1test not in library - need to use it instead
FGLOBJS+=$(BUILDDIR)/p_1test$(A4GL_OBJ_EXT)
MIFS+=$(BUILDDIR)/p_1test.mif
ALL4GLSRC+=$(V4GL)/einmalig/1test/p_1test.4gl
G_TXX=$(VMAKE)/g_txx_1test
export G_TXX
 ifeq "$(COPYDIR)" ""
 COPYDIR=/tmp/1test
endif
GLOBALS+=$(V4GL)/dll/g_txv.4gl
DEFAULT_GLOBALS=$(V4GL)/dll/g_txv.4gl
export DEFAULT_GLOBALS
LIBS+= -L$(V4GL)/dll
LIBS+= -lcommon
LIBS+= -laubit4gl

prerequisits: $(BUILDDIR) commonlibs
	@if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); chmod 777 $(BUILDDIR); fi
commonlibs:
	$(MAKE) -C $(V4GL)/dll -f make_common
$(BUILDDIR)/g_1test$(A4GL_OBJ_EXT): $(V4GL)/einmalig/1test/g_1test.4gl $(DEFAULT_GLOBALS)
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/g_1test.mif: $(V4GL)/einmalig/1test/g_1test.4gl
	A4GL_PACKER_EXT=.mif A4GL_PACKER=PACKED 4glpc -t WRITE -o $@ $<

$(BUILDDIR)/g_schema$(A4GL_OBJ_EXT): $(V4GL)/g_schema.4gl $(DEFAULT_GLOBALS)
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/g_schema.mif: $(V4GL)/g_schema.4gl
	A4GL_PACKER_EXT=.mif A4GL_PACKER=PACKED 4glpc -t WRITE -o $@ $<

$(BUILDDIR)/p_1test$(A4GL_OBJ_EXT): $(V4GL)/einmalig/1test/p_1test.4gl  $(GLOBALS_DEFS)
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/p_1test.mif: $(V4GL)/einmalig/1test/p_1test.4gl  $(GLOBALS_DEFS)
	A4GL_PACKER_EXT=.mif A4GL_PACKER=PACKED 4glpc -t WRITE -o $@ $<

tidy:
	rm -f $(FGLOBJS) $(OTHOBJS) $(MIFS) $(GLOBALS_DEFS)

cleantxx:
	rm -f $(G_TXX) $(LFILE_DIR)/g_1testtxv.4gl  $(LFILE_DIR)/t_1test.4gl
tidy_globals_dats:
	@rm -f $(GLOBALS_DEFS)
compile: prerequisits phony.globals $(BUILDDIR)/$(A4GL_EXE_PREFIX)1test$(A4GL_EXE_EXT)

run: compile
	cd $(BUILDDIR)/  &&  ./$(A4GL_EXE_PREFIX)1test$(A4GL_EXE_EXT)

$(BUILDDIR)/$(A4GL_EXE_PREFIX)1test$(A4GL_EXE_EXT): $(FGLOBJS) $(OTHOBJS) $(OBJS_CFORMS)
	4glc $(LFLAGS) -o $@ $(FGLOBJS) $(OTHOBJS) $(OBJS_CFORMS) $(LIBS)

clean:
	rm -f $(FGLOBJS) $(OTHOBJS) $(OBJS_CFORMS) $(FORMS) ${MIFS} $(GLOBALS_DEFS)  $(BUILDDIR)/$(A4GL_EXE_PREFIX)1test$(A4GL_EXE_EXT)
	rm -f $(G_TXX) $(LFILE_DIR)/g_1testtxv.4gl $(LFILE_DIR)/t_1test.4gl
phony.g_1testtxv: $(LFILE_DIR)/g_1testtxv.4gl
phony.globals: $(GLOBALS_DEFS)

%.glb.dat: %.4gl
	4glc -G $<

phony.globals.old: $(G_TXX) $(LFILE_DIR)/g_1testtxv.4gl $(LFILE_DIR)/t_1test.4gl $(GLOBALS_DEFS)
$(LFILE_DIR)/g_1testtxv.4gl $(LFILE_DIR)/t_1test.4gl:  $(G_TXX)
	mktxx $(G_TXX) $(LFILE_DIR)/g_1testtxv.4gl $(LFILE_DIR)/t_1test.4gl '$(LFILE_DIR_NOT_EXPANDED)/g_1testtxv.4gl'

$(BUILDDIR)/g_1testtxv$(A4GL_OBJ_EXT): $(LFILE_DIR)/g_1testtxv.4gl
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/t_1test$(A4GL_OBJ_EXT): $(LFILE_DIR)/t_1test.4gl
	unset DEFAULT_GLOBALS; DBPATH=$(DBPATH):$(V4GL):$(LFILE_DIR) 4glc -K $(CFLAGS) -o $@ $<
$(G_TXX):  $(ALL4GLSRC)
	mktxx_grep $(ALL4GLSRC) > $(G_TXX)
$(COPYDIR):
	mkdir $(COPYDIR)

copy: $(COPYDIR)
	cp $(ALL4GLSRC) $(ALLPERSRC) $(COPYDIR)
	cp $(LFILE_DIR)/make_1test_tmp $(COPYDIR)/Makefile
	cp $(LFILE_DIR)/g_1testtxv.4gl $(COPYDIR) || exit 0

lint : ${A4GL_LINTFILE}
$(A4GL_LINTFILE) : ${MIFS}
	A4GL_PACKED_EXT=.mif A4GL_PACKER=PACKED fgllint ${MIFS}

calltree : ${MIFS}
	A4GL_PACKED_EXT=.mif A4GL_PACKER=PACKED fglcalltree ${MIFS}
	dot -T pdf -Lg calltree.dot -o$(BUILDDIR)/1test.pdf
calltree_load : ${MIFS}
	A4GL_PACKED_EXT=.mif A4GL_PACKER=PACKED fglcalltree ${MIFS}
	load_calltree
make_1test_tmp (text/plain, 5.1 KB)
BUILDDIR=.
FORMS=
LIBS=
FGLOBJS=
MIFS=
OTHOBJS=
OBJS_CFORMS=
GLOBALS=
GLOBALS_DEFS=
A4GL_UI=CONSOLE
export A4GL_UI
ALL4GLSRC=
ALLPERSRC=
A4GL_PACKER:=$(shell aubit-config A4GL_PACKER)
A4GL_FRM_BASE_EXT:=$(shell aubit-config A4GL_FRM_BASE_EXT)
A4GL_PACKED_EXT:=$(shell aubit-config A4GL_PACKED_EXT)
A4GL_XML_EXT:=$(shell aubit-config A4GL_XML_EXT)
A4GL_EXE_EXT:=$(shell aubit-config A4GL_EXE_EXT)
A4GL_FORMTYPE:=$(shell aubit-config A4GL_FORMTYPE)
A4GL_HELP_EXT:=$(shell aubit-config A4GL_HELP_EXT)
A4GL_OBJ_EXT:=$(shell aubit-config A4GL_OBJ_EXT)
A4GL_LEXDIALECT:=$(shell aubit-config A4GL_LEXDIALECT)
A4GL_LEXTYPE:=$(shell aubit-config A4GL_LEXTYPE)
A4GL_C_COMP=ccache gcc
export A4GL_C_COMP
A4GL_EXE_PREFIX=p_
export A4GL_EXE_PREFIX
A4GL_USE_FORMXML=Y
export A4GL_USE_FORMXML
LFILE_DIR=.
export LFILE_DIR
TRY_LOCAL_GLOBALS_FIRST=Y
export TRY_LOCAL_GLOBALS_FIRST
A4GL_PROGNAME=1test_tmp
export A4GL_PROGNAME
ifeq "$(A4GL_LINTSTYLE)" ""
 A4GL_LINTSTYLE=XML
 export A4GL_LINTSTYLE
endif
ifeq "$(A4GL_LEXDIALECT)" "POSTGRES"
 A4GL_EC_EXT=.cpc
else
 A4GL_EC_EXT=.ec
endif

FCOMPILE=fcompile
ifeq "$(A4GL_FORMTYPE)" "GENERIC"
 ifeq "$(A4GL_PACKER)" "PACKED"
  A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)$(A4GL_PACKED_EXT)
 endif
 ifeq "$(A4GL_PACKER)" "GZPACKED"
  A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)$(A4GL_PACKED_EXT).gz
 endif
 ifeq "$(A4GL_PACKER)" "XML"
  A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)$(A4GL_XML_EXT)
 endif

 ifeq "$(A4GL_USE_FORMXML)" "Y"
  A4GL_FULL_FORM_EXT=.xml
  FCOMPILE=A4GL_PACKER=FORMXML fcompile
 endif
else
 A4GL_FULL_FORM_EXT=$(A4GL_FRM_BASE_EXT)
endif

ifeq  "$(A4GL_LINTFILE)" ""
 A4GL_LINTFILE=lint_1test_tmp.xml
 export A4GL_LINTFILE
endif
all: compile


ALL4GLSRC+=g_1test.4gl
GLOBALS+=g_1test.4gl
GLOBALS_DEFS+=g_1test.glb.dat
# g_1test not in library - need to use it instead
FGLOBJS+=$(BUILDDIR)/g_1test$(A4GL_OBJ_EXT)
MIFS+=$(BUILDDIR)/g_1test.mif
ALL4GLSRC+=g_schema.4gl
GLOBALS+=g_schema.4gl
GLOBALS_DEFS+=g_schema.glb.dat
# g_schema not in library - need to use it instead
FGLOBJS+=$(BUILDDIR)/g_schema$(A4GL_OBJ_EXT)
MIFS+=$(BUILDDIR)/g_schema.mif
# p_1test not in library - need to use it instead
FGLOBJS+=$(BUILDDIR)/p_1test$(A4GL_OBJ_EXT)
MIFS+=$(BUILDDIR)/p_1test.mif
ALL4GLSRC+=p_1test.4gl
G_TXX=$(VMAKE)/g_txx_1test_tmp
export G_TXX
 ifeq "$(COPYDIR)" ""
 COPYDIR=/tmp/1test_tmp
endif
GLOBALS+=$(LFILE_DIR)/g_1test_tmptxv.4gl
DEFAULT_GLOBALS=$(LFILE_DIR)/g_1test_tmptxv.4gl
export DEFAULT_GLOBALS
LIBS+= -laubit4gl
OTHOBJS+=$(BUILDDIR)/g_1test_tmptxv$(A4GL_OBJ_EXT)
GLOBALS_DEFS+=$(LFILE_DIR)/g_1test_tmptxv.glb.dat
OTHOBJS+=$(BUILDDIR)/t_1test_tmp$(A4GL_OBJ_EXT)

prerequisits: $(BUILDDIR) commonlibs
	@if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); chmod 777 $(BUILDDIR); fi
commonlibs:
	$(MAKE) -C $(V4GL)/dll -f make_common
$(BUILDDIR)/g_1test$(A4GL_OBJ_EXT): g_1test.4gl $(DEFAULT_GLOBALS)
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/g_1test.mif: g_1test.4gl
	A4GL_PACKER_EXT=.mif A4GL_PACKER=PACKED 4glpc -t WRITE -o $@ $<

$(BUILDDIR)/g_schema$(A4GL_OBJ_EXT): g_schema.4gl $(DEFAULT_GLOBALS)
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/g_schema.mif: g_schema.4gl
	A4GL_PACKER_EXT=.mif A4GL_PACKER=PACKED 4glpc -t WRITE -o $@ $<

$(BUILDDIR)/p_1test$(A4GL_OBJ_EXT): p_1test.4gl  $(GLOBALS_DEFS)
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/p_1test.mif: p_1test.4gl  $(GLOBALS_DEFS)
	A4GL_PACKER_EXT=.mif A4GL_PACKER=PACKED 4glpc -t WRITE -o $@ $<

tidy:
	rm -f $(FGLOBJS) $(OTHOBJS) $(MIFS) $(GLOBALS_DEFS)

cleantxx:
	rm -f $(G_TXX) $(LFILE_DIR)/g_1test_tmptxv.4gl  $(LFILE_DIR)/t_1test_tmp.4gl
tidy_globals_dats:
	@rm -f $(GLOBALS_DEFS)
compile: prerequisits phony.globals $(BUILDDIR)/$(A4GL_EXE_PREFIX)1test_tmp$(A4GL_EXE_EXT)

run: compile
	cd $(BUILDDIR)/  &&  ./$(A4GL_EXE_PREFIX)1test_tmp$(A4GL_EXE_EXT)

$(BUILDDIR)/$(A4GL_EXE_PREFIX)1test_tmp$(A4GL_EXE_EXT): $(FGLOBJS) $(OTHOBJS) $(OBJS_CFORMS)
	4glc $(LFLAGS) -o $@ $(FGLOBJS) $(OTHOBJS) $(OBJS_CFORMS) $(LIBS)

clean:
	rm -f $(FGLOBJS) $(OTHOBJS) $(OBJS_CFORMS) $(FORMS) ${MIFS} $(GLOBALS_DEFS)  $(BUILDDIR)/$(A4GL_EXE_PREFIX)1test_tmp$(A4GL_EXE_EXT)
	rm -f $(G_TXX) $(LFILE_DIR)/g_1test_tmptxv.4gl $(LFILE_DIR)/t_1test_tmp.4gl
phony.g_1test_tmptxv: $(LFILE_DIR)/g_1test_tmptxv.4gl
phony.globals: $(GLOBALS_DEFS)

%.glb.dat: %.4gl
	4glc -G $<

phony.globals.old: $(G_TXX) $(LFILE_DIR)/g_1test_tmptxv.4gl $(LFILE_DIR)/t_1test_tmp.4gl $(GLOBALS_DEFS)
$(LFILE_DIR)/g_1test_tmptxv.4gl $(LFILE_DIR)/t_1test_tmp.4gl:  $(G_TXX)
	mktxx $(G_TXX) $(LFILE_DIR)/g_1test_tmptxv.4gl $(LFILE_DIR)/t_1test_tmp.4gl '$(LFILE_DIR_NOT_EXPANDED)/g_1test_tmptxv.4gl'

$(BUILDDIR)/g_1test_tmptxv$(A4GL_OBJ_EXT): $(LFILE_DIR)/g_1test_tmptxv.4gl
	4glc -K $(CFLAGS) -o $@ $<
$(BUILDDIR)/t_1test_tmp$(A4GL_OBJ_EXT): $(LFILE_DIR)/t_1test_tmp.4gl
	unset DEFAULT_GLOBALS; DBPATH=$(DBPATH):$(V4GL):$(LFILE_DIR) 4glc -K $(CFLAGS) -o $@ $<
$(G_TXX):  $(ALL4GLSRC)
	mktxx_grep $(ALL4GLSRC) > $(G_TXX)
lint : ${A4GL_LINTFILE}
$(A4GL_LINTFILE) : ${MIFS}
	A4GL_PACKED_EXT=.mif A4GL_PACKER=PACKED fgllint ${MIFS}

calltree : ${MIFS}
	A4GL_PACKED_EXT=.mif A4GL_PACKER=PACKED fglcalltree ${MIFS}
	dot -T pdf -Lg calltree.dot -o$(BUILDDIR)/1test_tmp.pdf
calltree_load : ${MIFS}
	A4GL_PACKED_EXT=.mif A4GL_PACKER=PACKED fglcalltree ${MIFS}
	load_calltree
p_1test.4gl (text/plain, 1.6 KB)
--!GLOBALS "$V4GL/einmalig/1test/g_1test.4gl"

MAIN

DATABASE vmain_vdb

CALL test()

END MAIN

# ----------------------------------------------------------------------------------------
# FUNCTION test()
# ----------------------------------------------------------------------------------------

FUNCTION test()

DEFINE float_1       FLOAT
DEFINE decimal_16    DECIMAL(16)

LET decimal_16 = 1/6
LET float_1   = decimal_16

DISPLAY "decimal_16:                         ", decimal_16 USING "######&.#######################"
DISPLAY "float_1 = decimal_16:               ", float_1   USING "######&.#######################"


LET r_vpos.evk_pe_dm = float_return()
LET decimal_16        = float_return()

DISPLAY "decimal_16 nach float_return:       ", decimal_16 USING "######&.#######################"
DISPLAY "r_vpos.evk_pe_dm nach float_return: ", r_vpos.evk_pe_dm USING "######&.#######################"

LET r_vpos.evk_pe_dm = decimal_16
DISPLAY "r_vpos.evk_pe_dm = decimal_16:      ", r_vpos.evk_pe_dm USING "######&.#######################"

LET float_1   = 1/6
LET decimal_16 = float_1
DISPLAY "float_1             :               ", float_1   USING "######&.#######################"
DISPLAY "decimal_16 = float_1:               ", decimal_16 USING "######&.#######################"

END FUNCTION

# ----------------------------------------------------------------------------------------
# FUNCTION float_return()
# ----------------------------------------------------------------------------------------

FUNCTION float_return()

DEFINE l_float FLOAT

LET l_float = 1 / 6

RETURN l_float

END FUNCTION
testTable.sql (text/plain, 42 B)
CREATE TABLE vpos (evk_pe_dm decimal(16))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.