Oxygen Basic
Programming => Problems & Solutions => Topic started by: Emil_halim on March 16, 2013, 08:46:37 AM
-
Hi all ,
I have a Zlib.h header file , so the next line is not understood by OxyGen, any help?
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
it gave this Error
ERROR:
unknown type
WORD: voidpf
LINE: 77
FILE: zlib.h
Edited:
BTW i have the next code in a header file that included in zLib.h , but seems Oxygen did not see it.
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
-
Have an other Error
consider the following code in c language.
#ifndef FAR
# define FAR
#endif
...
.....
...... and later
typedef Byte FAR Bytef;
^^^
|
this is ok with c
but not with Oxygen
the FAR term is nothing by deceleration (#define FAR) , so when parse the last line (typedef Byte FAR Bytef) it must be like that (typedef Byte Bytef)
Oxygen give this error
ERROR:
'FAR' is already defined
WORD: Byte
LINE: 264
FILE: zconf.h
-
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
It gets thrown by the OF word
Is there a definition of OF?
#ifndef far
# define far
#endif
typedef byte far bytef
bytef b
print sizeof b
I have a fix for this situation.
Oxygen does not have a separate preprocessor layer like C. This has advantages, like the ability to create scoped/localised macros, but gets us into trouble with C headers which plonk macros in strange places. ::)
-
It gets thrown by the OF word
Is there a definition of OF?
no the problem was something belong C directives i.e #case sensitive ........
I have a fix for this situation.
hope to see it :)
Oxygen does not have a separate preprocessor layer like C. This has advantages, like the ability to create scoped/localised macros, but gets us into trouble with C headers which plonk macros in strange places.
i have a simple idea , make a new directive for preprocessor stuff , so that it will be 100% compatible with
C , or it will be as it already is , what do you think ?
BTW the fast , easy and short way for achieving certain things with Oxygen Basic is attractive me to this
great language. :)
-
BTW the fast , easy and short way for achieving certain things with Oxygen Basic is attractive me to this
great language.
Strange why others can't see the obvious that O2 is probably the most relevant version of Basic available. (followed by ScriptBasic of course ... :) )
-
John,
I think Oxygen Basic needs a good help Files and variable difficult tutorials these will demonstrate the power
and advantage of Oxygen Basic.
-
I think Oxygen Basic needs a good help Files and variable difficult tutorials these will demonstrate the power
and advantage of Oxygen Basic.
I agree...currently is very confusing from people outside to figure what is what .
-
i have a simple idea , make a new directive for preprocessor stuff , so that it will be 100% compatible with
C , or it will be as it already is , what do you think ?
Yes, I seem to be heading in that direction. We could preprocess all the #defines first, and it may not require a separate C switch. Oxygen has its own set of dynamic macro constructs as well.
With regard to tutorials, I hope these will emerge eventually from all the examples we have accumulated.
Charles
-
We could preprocess all the #defines first, and it may not require a separate C switch. Oxygen has its own set of dynamic macro constructs as well.
I think that will be the best solution here , No more Directives .......
-
Case sensitivity is a potential problem.
#case capital is useful for handling fully capitalised words, treating all others as case insensitive.
-
Hi,
A tutorial will be very welcome... :)
Haim
-
I would like to see something like a code database, with hypelinks giving easy access to all the examples. All my man-hours at present are spent on development.
-
Hi Charles ,
We could preprocess all the #defines first, and it may not require a separate C switch
is there any progress here?
Emil.
-
Hay any body home?
-
This is an intricate operation. I need a lots of spare time to go through this.
-
Hi Charles,
if you please , take that into your considerations.
i am waiting becouse i tried to compile Zlib written in c with Oxygen , so the first problem was acting of
#define.
thanks again for your oxygen effort.
-
Slowly getting there. I have a clearer picture now about what needs to be done for C preprocessor compatibility.
Though we will still have to deal with potential name/symbol conflicts.
-
I have a clearer picture now about what needs to be done for C preprocessor compatibility.
when can this Picture born and come to the life?
i think you forgot this topic.
BTW , why your country force United Nations to take action against us,we are fitting a terrorism her.
-
Maybe terrorists are smarting up and realize antagonizing countries with unlimited resources is counter productive so they are adopting the big fish in a small pond strategy. I'm hoping with time the fad wears off and people will find other ways to work out their differences. (paint balls, chess, ...)
-
BTW , why your country force United Nations to take action against us,we are fitting a terrorism her.
This is programming forum and really i don't see reason for such a political questions,right?
-
Maybe terrorists are smarting up and realize antagonizing countries with unlimited resources is counter productive so they are adopting the big fish in a small pond strategy. I'm hoping with time the fad wears off and people will find other ways to work out their differences. (paint balls, chess, ...)
John,
the Fact here is that the matter is not a differences between people, it is a real terrorism came from small amount of Armed group against unarmed people and State enterprises. i think your government did not seeing that well.
Note well , The police and the army deal gently with them and they are dealing terrorizing citizens
-
In our country they are known as the mob, family, ...
-
Hi Emil,
the C preprocessor is on my list. I have not forgotten, but it will have to wait till I have sufficient time/energy to deal with the fairly major structural changes that are required.
Under the current macro system, only headers with complex macros are likely to be misinterpreted. Are there any header issues currently affecting your projects?
-
That is where I understood the C include option stood. After the FreeImage header translation enhancement, I took it as you would look as C header issues as a as needed basis. Asking if Jose Roca's include files could be used may have been asking too much.
-
Hi Charles,
Under the current macro system, only headers with complex macros are likely to be misinterpreted. Are there any header issues currently affecting your projects?
till now the only error i had is hierarchic header problem. i think modifying oxygen basic is not big deal when
changing #define directive to handle hierarchic header stuff.
-
Emil,
Would you be willing to take the lead with the C/C++ header file support with O2? I think the best way to test the header include functionality is try importing some of the common used libraries and see what blows up. The FreeImage headers was one of those unexpected deals where the function names in the include didn't match the name in the DLL.
I think it's easier on Charles when he is working with team leader to move things along rather than getting blasted by a bunch of whining forum members that have their own agenda.
John