Re: Invalid conversion error when using TEXT datatype in INPUT
Walter Haslbeck <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks Mike!
this fixes the TUI, but in the XML UI this is still broken. (see
attached debug log).
Now to the CVS compilation problem:
compilation stops at fcompile, here is a console dump:
wh@lynch:~/AUBIT/build/aubit4glsrc-cvs/compilers/fcompile$ make
gcc -Wall -Wredundant-decls -Wmissing-declarations -Wmissing-prototypes
-Wstrict-prototypes -g -fPIC -DPIC -DSRC_TREE -DDEBUG -DHAVE_CONFIG_H
-I/home/wh/AUBIT/build/aubit4glsrc-cvs/incl
-I/home/wh/AUBIT/build/aubit4glsrc-cvs -fPIC -DPIC -I../../lib/libincl
-I. -I/usr/local/include -I/usr/local/rpc -I/usr/local -c -o y.tab.o
y.tab.c
screen.yacc: In function 'a4gl_form_yyparse':
screen.yacc:1980:6: warning: variable 'n' set but not used
[-Wunused-but-set-variable]
$<col_list>$->columns.columns_val[0].tabname=$<column>1.tabname;
^
In file included from screen.yacc:2387:0:
lex.yy.c: At top level:
lex.yy.c:166:14: warning: redundant redeclaration of 'yyin'
[-Wredundant-decls]
extern FILE *yyin, *yyout;
^
screen.yacc:947:23: note: previous declaration of 'yyin' was here
^
In file included from screen.yacc:2387:0:
screen.lex: In function 'a4gl_form_yylex':
screen.lex:398:10: error: 'NAMED_CASE_SPECIFIC' undeclared (first use in
this function)
return(NAMED_CASE_SPECIFIC);
^
screen.lex:398:10: note: each undeclared identifier is reported only
once for each function it appears in
In file included from screen.yacc:2387:0:
lex.yy.c: At top level:
lex.yy.c:4167:12: warning: redundant redeclaration of 'isatty'
[-Wredundant-decls]
extern int isatty (int );
^
In file included from
/home/wh/AUBIT/build/aubit4glsrc-cvs/incl/a4gl_libaubit4gl.h:709:0,
from a4gl_fcompile_int.h:4,
from screen.yacc:25:
/usr/include/unistd.h:801:12: note: previous declaration of 'isatty' was
here
extern int isatty (int __fd) __THROW;
^
In file included from screen.yacc:2387:0:
lex.yy.c:3936:17: warning: 'yyunput' defined but not used
[-Wunused-function]
static void yyunput (int c, register char * yy_bp )
^
lex.yy.c:3981:16: warning: 'input' defined but not used [-Wunused-function]
static int input (void)
^
make: *** [y.tab.o] Fehler 1
wh@lynch:~/AUBIT/build/aubit4glsrc-cvs/compilers/fcompile$
On 09.11.2013 15:29, Mike Aubury wrote:
> Hmm - I think there is a problem with validation check - its trying to
> convert to a string so it can run some checks - but I'm really not
> sure it needs to run those on blobs..
>
> I've committed the change to CVS - if you can try that and let me know
> if you're still having compilation issues - I can try to fix those too..
>
> If you just want to make the change on your own local source - try
> adding the "if" test in lib/libui/ui_curses/ioform.c :
>
>
> int
> A4GL_check_and_copy_field_to_data_area (struct s_form_dets *form,
> struct struct_scr_field
> *fprop, char *fld_data, char *data_area, int var_dtype)
> {
> int pprval;
> int dsize;
>
> // Add these 3 lines
> if ((fprop->datatype & DTYPE_MASK) == DTYPE_BYTE || (fprop->datatype
> &DTYPE_MASK) == DTYPE_TEXT) {
> return 1;
> }
>
>
> and see how you get on..
>
>
>
>
>
> On 9 November 2013 12:51, <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hello,
> when I use the INPUT statement with a TEXT datatype I get an
> "Invalid conversion" error after finishing the INPUT with the
> accept key.
> Here is a minimal example:
> t1.4gl:
> =====
> main
> define b1 text
> open window w1 with form "f1"
> locate b1 in file "/tmp/b1"
> input b1 without defaults from myblob
> close window w1
> end main
> =====
> f1.per:
> =====
> database formonly
> screen
> {
> [a ]
> }
> end
> attributes
> a = formonly.myblob type text;
> =====
> compile with
> 4glpc t1.4gl -o t1.4ae
> fcompile f1.per
> then run t1.4ae, press "!" to start DBEDIT, write some text, close
> edtor, finish INPUT with accept key:
> Err:Program ./t1.4ae stopped at 't1.4gl', line number 5.
> Error status number -30284.
> Invalid conversion.
> 4gl function call stack :
> MAIN
> I seams the the INPUT statement accepts the datatype TEXT but
> returns it als CHAR?
> see also the attached debug.out.gz
> I used version 1.2_34 from aubit.com <http://aubit.com> (not the
> latest CVS version, had some problems to compile on my machine).
> System: ubuntu linux 13.10 64bit (compiler: gcc (Ubuntu/Linaro
> 4.8.1-10ubuntu8) 4.8.1).
> This happens with A4GL_UI=TUI and also with XML (ventas client).
> thanks for any help!
> Walter
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming
> models. Explore
> techniques for threading, error checking, porting, and tuning. Get
> the most
> from the latest Intel processors and coprocessors. See abstracts
> and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
>
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
debug.out.gz
(application/gzip, 11.8 KB) - not displayed