March 28, 2024, 06:34:15 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


My thoughts on compiler includes (.inc / .incc from before)

Started by Parker, November 09, 2005, 08:53:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

It's great that you don't have to include a whole bunch of headers in your source file, but problems come up when the default files include declarations that exist in other includes. For an example, I was trying to use the control pak with ImageListApi.inc and I got "duplicate definition" messages. I understand that the linker does its choosing at the end so even if you have 30 paks installed you won't get a 10MB program, but personally I think it would be better to keep the default include files to a minimum, even the GUI library should be a #include "gui.inc" one.

If it ends up that the 'bin' directory is the default for new libraries, maybe an exclude command could be added so you could specify which includes not to include on compile time, resolving any problems. It could take the form
#exclude "somefile.inc" // I don't want the somefile.inc file included
or
#exclude all // I don't want any default inludes
I suppose if it was parsed when the subroutine definitions are it wouldn't be a big problem, but it's all up to Paul really. This is just my opinion. Anyone else is welcome to share their views on the situation so we can see what everyone else thinks.

Ionic Wind Support Team

There are no command paks in Aurora, that's a different language.

The libraries included with Aurora will be a minimal set of functions needed for operation, much like the C standard library.  Anything else will be up to the programmer to include any necessary .inc files.

The Aurora standard library is separated into different modules.

fileio
strings
console
common
math
gui

There are no Windows constants defined in the .inc files located in the binary directory, doing so would not be cross platform compatible.  In fact if you look in those .inc files you'll only see external function definitions and a few constants of my own definition.

The GUI libraries are being designed so that similar functions are used on both OS's. 
Ionic Wind Support Team

Parker

Thanks for clearing that up. It sounds a lot better now.

Bruce Peaslee

Quote from: Parker on November 10, 2005, 08:20:44 AM
Thanks for clearing that up. It sounds a lot better now.
Well, I just got confusedÂÃ,  ;)

This is my first effort:

Global sub main()
{
writeln (str$(AWS_CAPTION));
While getkey()="";
Return 0;
}


In other languages the constant AWS_CAPTION has to be explicitly defined in the code or in an include. This doesn't appear to be the case here. Where are these definitions?
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Ionic Wind Support Team

Its in "gui.inc"

They are named as not to interfere with constants used by either OS.  On Window the constant AWS_CAPTION will be a one to one correlation to WS_CAPTION.  On Linux it will be a one to one correlation with the constant used there.

Your code won't change, only mine.

Paul.

Ionic Wind Support Team

Bruce Peaslee

Thanks, Paul.

You know I looked at those files and had thought I opened them all.ÂÃ,  :P
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles