dbTalk Databases Forums  

4gl to C problem

comp.databases.informix comp.databases.informix


Discuss 4gl to C problem in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Watson
 
Posts: n/a

Default 4gl to C problem - 09-15-2003 , 05:40 AM






Having not used 4gl to C for a while something is doing my head in,
IDS 9.30, 4gl 7.30.UC3 on Solaris 7

Why doesn't this not work, it cores on the popint, changing it to
popquote(teststr,11) it's fine, reversing the popint/popquote
makes no difference - it still cores on popint.

As I don't do difficult it must be easy and obvious but I can't see
it

4gl

main

define mystat integer

CALL listfile("/home/eric",10) returning mystat;

end main

C file

#include <stdio.h>
#include <sys/types.h>
#include <fglapi.h>

int listfile(int nargs)
{
int ftype;
char teststr[11];

popint(ftype);
popquote(teststr,11);

retint(2);
return(1);

}

--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #

Reply With Quote
  #2  
Old   
Andy Lennard
 
Posts: n/a

Default Re: 4gl to C problem - 09-15-2003 , 06:25 AM






In message <3F659730.4CB59084 (AT) oninit (DOT) com>, Paul Watson <paul (AT) oninit (DOT) com>
writes
Quote:
Having not used 4gl to C for a while something is doing my head in,
IDS 9.30, 4gl 7.30.UC3 on Solaris 7

Why doesn't this not work, it cores on the popint, changing it to
popquote(teststr,11) it's fine, reversing the popint/popquote
makes no difference - it still cores on popint.

As I don't do difficult it must be easy and obvious but I can't see
it

4gl

main

define mystat integer

CALL listfile("/home/eric",10) returning mystat;

end main

C file

#include <stdio.h
#include <sys/types.h
#include <fglapi.h

int listfile(int nargs)
{
int ftype;
char teststr[11];

popint(ftype);
popint(&ftype);

Quote:
popquote(teststr,11);

retint(2);
return(1);

}

--
Andrew Lennard andy (AT) kontron (DOT) demon.co.uk


Reply With Quote
  #3  
Old   
Paul Watson
 
Posts: n/a

Default Re: 4gl to C problem - 09-15-2003 , 06:55 AM



Andy

thanks for that, knew it was obvious and it is the TFM

Paul

Andy Lennard wrote:
Quote:
In message <3F659730.4CB59084 (AT) oninit (DOT) com>, Paul Watson <paul (AT) oninit (DOT) com
writes
Having not used 4gl to C for a while something is doing my head in,
IDS 9.30, 4gl 7.30.UC3 on Solaris 7

Why doesn't this not work, it cores on the popint, changing it to
popquote(teststr,11) it's fine, reversing the popint/popquote
makes no difference - it still cores on popint.

As I don't do difficult it must be easy and obvious but I can't see
it

4gl

main

define mystat integer

CALL listfile("/home/eric",10) returning mystat;

end main

C file

#include <stdio.h
#include <sys/types.h
#include <fglapi.h

int listfile(int nargs)
{
int ftype;
char teststr[11];

popint(ftype);

popint(&ftype);

popquote(teststr,11);

retint(2);
return(1);

}


--
Andrew Lennard andy (AT) kontron (DOT) demon.co.uk
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.