Author Topic: general programming question about "include.inc" files  (Read 2598 times)

0 Members and 1 Guest are viewing this topic.

Frankolinox

  • Guest
general programming question about "include.inc" files
« on: April 23, 2013, 12:59:55 AM »
..sounds perhaps a little bit funny, but this question troubled in my head last week. I have a general programming question about "include" files for oxygen and other basic languages. Why do you need it at all these include file for running win api's, controls, method's, functions and much more? Why doesn't you included all these stuff in main core application (here: basic programming language) of all various *.basicDll" you're working with? because of reasons for convertion from one programming language to another one or because of reasons for speed or get better access to other functions of different *.dll's? I am just wondering why it can't be easier.

if I see at some oxygen examples the include path files overview (adventure landscape for openGL examples e.g.) it's look like a djungle ;) powerbasic uses for all include file's a collected map like "winapi.inc" or newer "windows.inc". but if there's missing only one function in an include file the program will strike and gives error messages. so why all developer don't collect all needed file after running all the examples you're working with in one "Include.DLL" or exe file?

regards, frank

Charles Pegge

  • Guest
Re: general programming question about "include.inc" files
« Reply #1 on: April 23, 2013, 01:22:25 AM »
Yes Frank, this is a problem for many languages and APIs. Oxygen is not as bad as C :)

When Oxygen is a little more mature, I would like to take a lot of the includes and put them into a DLL that apps can use with a single header. Peter already does this with his 2d Graphics systems.

With #compact (dead code removal) , it is also feasible to provide a single unifying header and still produce small exe files.

But the jungle will still be there for those who wish to venture into it.


Charles

JRS

  • Guest
Re: general programming question about "include.inc" files
« Reply #2 on: April 23, 2013, 11:40:08 AM »
There is so much good stuff out there to include in your applications that save time and are proven resources. Keeping up to date with external library projects is a chore. (see FreeBASIC BI nightmare)  Charles has made it possible for the ScriptBasic project to script API's/libraries dynamically at runtime, declaring functions, structures and providing a threaded callback manager so non-thread safe libraries (like IUP) don't freak out. (GPF) I believe dynamic scripting of only the resources you need at runtime without compiling or linking is how programming will be done going forward. IMHO


Peter

  • Guest
Re: general programming question about "include.inc" files
« Reply #3 on: April 24, 2013, 11:47:56 AM »
John,

At the moment, I thought that you speak German perfectly.

X

JRS

  • Guest
Re: general programming question about "include.inc" files
« Reply #4 on: April 24, 2013, 12:20:05 PM »
Based on the German hit count, I may need to.  :D
« Last Edit: April 24, 2013, 12:38:59 PM by JRS »

Frankolinox

  • Guest
Re: general programming question about "include.inc" files
« Reply #5 on: April 27, 2013, 12:59:54 AM »
is there any way to create for example an "RTL32.DLL" (formerly well known as "RTL32.inc") file with same power to load as an "rtl32.inc." file in an oxygen example (*.o2bas) ? I tried this experiment yesterday but the DLL return a "0" value after loading (library) so it couldn't work ;) it's working perfect as "rtl32.o2bas" or of course how usual with "rtl32.inc" file on top of code example.

just an idea...

regards, frank

Charles Pegge

  • Guest
Re: general programming question about "include.inc" files
« Reply #6 on: April 27, 2013, 01:40:15 AM »
Hi Frank, The RTL source code is essential for making an independent DLL.

Frankolinox

  • Guest
Re: general programming question about "include.inc" files
« Reply #7 on: April 27, 2013, 07:07:14 AM »
yes, I know, I wanted to know if I can make an "Rtl32.dll" instead of include file "rtl32.inc" and look what happens, if there's creation with a simple "hello" ($dll) oxygen example and testing it with another *.o2bas file ;)

best regards, frank

Charles Pegge

  • Guest
Re: general programming question about "include.inc" files
« Reply #8 on: April 27, 2013, 08:00:06 AM »
Yes, It should be possible to create a single file containing RTL with the main source code appended to it.