Re: Interpret() & More suggestions
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jun 14, 1997
- 660 views
<about interpret () routine> > I'm puzzled. Can someone give a real-life example of something that would > be made much easier/faster/simpler by using an interpret() function? Here are a few example and benefits this routine will have.. New Possibilities.. =-=-=-=-=-=-=-=-=-= * Any form of scripting in your program, for very smart macro's in your text-editing program perhaps... * Saving the AI routines to the level file they are needed.... * Better error handling in your programs, you can receive the error message as a function result (instead of writing it to a .ERR file) and tell the user which part of the code has gone wrong and what his new options are... Memory Savings.... =-=-=-=-=-=-=-=-=-= * Loading the intro-code (with data perhaps) in the beginning, then unload it, and load the game-code, this save a lot memory.... * If you need to make a program that runs .ex programs like the text-gui from David Cuny or the standard ed.ex program delivered with Euphoria you can save the memory that would be needed for loading the ex.exe... and your eu-code will be twice in memory, once for the editor and once for the new copy of ex.exe in memory... Speed Savings.... =-=-=-=-=-=-=-=-= * You can pre compile code to run quicker which specified settings, for example the sprites, there can be statements like this: poke (#A0000 + 4, {12,2,3,9,9,9}) The interpreter stores them one time and uses them much quicker, you also don't have to ask the 'is it a see-through pixel' question, which saves a lot of time... * You can determine when to compile the pieces of code seperately and hide it in your program at a point where they must read or something... * For programs that need to start a seperate .EX file, they save the time of loading and initializing the ex.exe program and the program can be included in the complete overall program without anyone noticing the loading of ex.exe Have more question, mail me... Ralf Nieuwenhuijsen nieuwen at xs4all.nl