#define inside another #define

Started by Proskrito, Tue 29/06/2004 11:17:38

Previous topic - Next topic

Proskrito

Sorry if its a silly question, or if its technically imposible, or whatever, but i dont know anything about scripting languages, nor how defines work:

Would it be possible to use a define inside another? like:
#define NUMBER 5

and later:
#define OTHER_NUMBER NUMBER

so OTHER_NUMBER would take the value of NUMBER
or even
#define OTHER_NUMBER NUMBER+3

so it would be like 5+3
I know its not possible now, but could it be in the future?

Gilbert

I remember CJ explained about this issue in some other thread, but I'm just too lazy to dig that out.

I think the script compiler is not recursive, so don't do that.

And I don't think that's really such important, considering the effort on implementing it and it's not a complete programming package, #define was just there to give you some small convenience.

Proskrito

#2
QuoteI remember CJ explained about this issue in some other thread, but I'm just too lazy to dig that out.
do you mean this one? : http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12394.0
QuoteAnd I don't think that's really such important, considering the effort on implementing it and it's not a complete programming package, #define was just there to give you some small convenience.
Ah ok, i just wanted to know if i should forget about it forever : )

Pumaman

yeah, this is a known issue, but as Gilbert says it's not intended to be a full scale programming language, and there are plenty of other more important things to be done.

netmonkey|work

While we' re on the topic of preprocessor stuff, any chance for #include or additional modules to be implemented? The other day I coded a bunch of stuff on top of the script editor and it's looking to be pretty messy... I'm afraid that I won't be able to read it later on because there is a lot of stuff going on.

I guess I could just rely on using the menu on the main ags editor to access the function scripts, but I do have a lot of user-defined functions, and I said those are the ones I'm concerned about. Maybe the script editor could have a combo list of funcitons and whatnot (like visual studio does, you know?) that makes it easier to jump from function to function.

Then again... I COULD use my own text editor or even find a way to train visual studio to understand AGS code. Forget what I said. :P

Mr Jake


Alynn

Actually I had a thought like this... an external file that you can build your own function library... something that all games you make can use. It could save time coping and pasting from previous games into your global script...

Just a thought mind you... but it could be very useful

Pumaman

#include is not planned; however, some sort of Add-In Manager, similar to the Plugin MAnager but for normal scripts, has been on my to-do list for a while.

Ishmael

#8
I believe I was the first to ages ago suggest #include to be added, and it got turned down; afterwards it has come up a few times. Excuse me, but do people ever search? As I found the thead with the search function very easily...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk