ID:265245
 
Would it be possible to let certain codes in a single variable to be processed at certain times?

proc/Start_File(var/file)
set hidden = 1
for(var/obj/File/O in view(1))
if(O.name == file)
if(O.id == "Custom")
O.coding


The above statement does not work becouse O.coding is processed as a tag, not as a code.
Would it be possible, in any kind of way, to replace O.coding with a code like...

processcode(O.coding)


...or anything in that kind?

If it would, you would be able to make customized programs that will function properly.
This isn't possible because while Dream Seeker does act as a slight interpreter it sorta like Java compiles the code.
What exactly are you trying to do? If you are trying to create a scripted language; its already possible, but it takes a bit more than processcode(O.coding) =)

If you want info on creating scripted languages, I'd suggest reading books on compilers, lexical analyzers, mini-languages, and such. They provide a lot of insight into the concepts behind it.
If you mean to specify an object's code at run time, then no, it isn't possible. BYOND, like any other programming language (distinct from a scripting language), requires recompilation before new data can be added to a game.

The MUDs and RPGs you see on the internet allow you to code in a scripting language, but those MUDs and RPGs are written in a programming language which is designed to read their special scripting language. To be able to duplicate the same functionality in DM, you'd have to make a soft-coded scripting language interpreter capable of reading DM code inputted at run-time. Considering that BYOND doesn't allow you any flexibility over memory management (and has a fixed-length object table), any such venture would have to be done at extremely small scales, because large scales would be horrendously inefficient, or even impossible.
In response to Spuzzum
In response to Exadv1
Except that is a *very* non-robust scripting language.