Re: Future reuse of code
"goose" <ruse@webmail.c o.za> wrote in message
news:ff82ae1b.0 308150117.7098f 889@posting.goo gle.com...
| WB <su-news@bossi.com> wrote in message
news:<vxW_a.729 248$3C2.1702208 9@news3.calgary .shaw.ca>...
| > Roedy Green wrote:
| > > Don't be silly. Look at any C code designed to run on many platforms.
| > > It is riddled with macros to pull off the feat.
| > >
| > > You can do a few simple things like parse the command line, open a
| > > flat file in a platform independent way, but not even the size of int
| > > is guaranteed unless you play some games with macros.
| >
| > Well, no you can't open a file in a generic way. Opening a file on a PC
| > is different than opening a file on a mainframe. You need a special
| > library to do this:
| >
| > #ifdef I370
| > #include <lcio.h>
| > #endif
| >
| > Which works with the SAS C compiler.
| >
| > Plus, all your variables and function names need to be 8 characters or
| > less, AND mixed case is ignored, so VarA and VARA are the same, thanks
| > to the mainframe linker.
| >
| > At least it was a few years ago. Things may have chnaged since then....
|
| if it does not support fopen, it is not a std-compliant C hosted
| environment.
|
| goose
That's OK, you can write for the Z80, and ignore the mainframe.
"goose" <ruse@webmail.c o.za> wrote in message
news:ff82ae1b.0 308150117.7098f 889@posting.goo gle.com...
| WB <su-news@bossi.com> wrote in message
news:<vxW_a.729 248$3C2.1702208 9@news3.calgary .shaw.ca>...
| > Roedy Green wrote:
| > > Don't be silly. Look at any C code designed to run on many platforms.
| > > It is riddled with macros to pull off the feat.
| > >
| > > You can do a few simple things like parse the command line, open a
| > > flat file in a platform independent way, but not even the size of int
| > > is guaranteed unless you play some games with macros.
| >
| > Well, no you can't open a file in a generic way. Opening a file on a PC
| > is different than opening a file on a mainframe. You need a special
| > library to do this:
| >
| > #ifdef I370
| > #include <lcio.h>
| > #endif
| >
| > Which works with the SAS C compiler.
| >
| > Plus, all your variables and function names need to be 8 characters or
| > less, AND mixed case is ignored, so VarA and VARA are the same, thanks
| > to the mainframe linker.
| >
| > At least it was a few years ago. Things may have chnaged since then....
|
| if it does not support fopen, it is not a std-compliant C hosted
| environment.
|
| goose
That's OK, you can write for the Z80, and ignore the mainframe.
Comment