Pre-compiler
#6

Quote:
Originally Posted by Sinner
View Post
So this would be like, writing functions that natively don't exist but the compiler converts them in the background, right? LoadFromFile(g_Vehicles, "vehicles.txt"); would become multiple lines of code but the actual programmer won't see this as it is done by the precompiler.

That sounds absolutely amazing. I'm fairly good at JavaScript, unforunately we're covering Node.js and JSon this semester so I won't be able to help with the really advanced stuff, which I imagine will be all of this.

Make it, please
In the case of LoadFromFile, it would somehow be informed of the enum structure of "g_Vehicles", then save the data in a file also containing the key names (so the enum can be modified and data will still be loaded properly).
Saving enums automatically is actually currently doable, but only as raw data, which would be corrupted when the enum is modified (and it can't be manually modified unless you're a robot or a Y_Less).

Node.js is just like in the browser, but with different idioms and structuring (arguably). It's super-easy to get started with and lots of fun!
JSON is a JavaScript object stored as a string (essentially), so now you've learned all you need about JSON!
Reply


Messages In This Thread
Pre-compiler - by Slice - 26.02.2013, 11:32
Re: Pre-compiler - by mastermax7777 - 27.02.2013, 06:13
Re: Pre-compiler - by Slice - 27.02.2013, 06:38
Re: Pre-compiler - by zgintasz - 27.02.2013, 07:02
Re: Pre-compiler - by Sinner - 27.02.2013, 07:35
Re: Pre-compiler - by Slice - 27.02.2013, 07:43
Re: Pre-compiler - by Slice - 27.02.2013, 10:28
Re: Pre-compiler - by steki. - 27.02.2013, 10:43
Re: Pre-compiler - by Y_Less - 27.02.2013, 10:51
Re: Pre-compiler - by Misiur - 27.02.2013, 11:19
Re: Pre-compiler - by Gamer_Z - 27.02.2013, 11:55
Re: Pre-compiler - by RajatPawar - 27.02.2013, 12:06
Respuesta: Pre-compiler - by kirk - 27.02.2013, 12:20
Re: Pre-compiler - by Y_Less - 27.02.2013, 12:37
Re: Pre-compiler - by RajatPawar - 27.02.2013, 14:46
Re: Pre-compiler - by Y_Less - 27.02.2013, 15:10
Re: Pre-compiler - by Dan.. - 27.02.2013, 17:38
Re: Pre-compiler - by Slice - 27.02.2013, 18:25
Re: Pre-compiler - by Y_Less - 27.02.2013, 21:39
Re: Pre-compiler - by Dan.. - 28.02.2013, 08:47
Re: Pre-compiler - by steki. - 28.02.2013, 09:56
Re: Pre-compiler - by RajatPawar - 28.02.2013, 09:58
Re: Pre-compiler - by Y_Less - 28.02.2013, 10:06
Re: Pre-compiler - by RajatPawar - 28.02.2013, 10:19
Re: Pre-compiler - by Y_Less - 28.02.2013, 10:21
Re: Pre-compiler - by RajatPawar - 28.02.2013, 10:32
Re: Pre-compiler - by Y_Less - 28.02.2013, 10:36
Re: Pre-compiler - by RajatPawar - 28.02.2013, 10:40
Re: Pre-compiler - by Slice - 05.03.2013, 13:16
Re: Pre-compiler - by Y_Less - 05.03.2013, 13:22
Re: Pre-compiler - by Slice - 12.03.2013, 14:33
Re: Pre-compiler - by fiki574 - 12.03.2013, 15:17
Re: Pre-compiler - by zgintasz - 25.03.2013, 12:47
Re: Pre-compiler - by Slice - 25.03.2013, 12:59

Forum Jump:


Users browsing this thread: 7 Guest(s)