More Complex Substitution
More complex code in MPI may become difficult to read. Some examples: This sequence informs the user of the next database save:
Next scheduled save will occur at {convsecs:{add:{prop:_sys/dumpinterval,#0}, {prop:_sys/lastdumptime,#0}}}\, being in {ltimestr:{subt:{add: {prop:_sys/dumpinterval,#0},{prop:_sys/lastdumptime,#0}},{secs}}}Next, a loop of a fixed range of iterations that generates random text. A property named ascii on the same object would need to be loaded with the ASCII characters from the 32-127:
{null:{store:,launchcode,this},{if:{&arg},{store:{min:60,{max:1,{&arg}}},count,this}, {store:{dice:60},count,this}},{while:{not:{eq:-1,{store:{subt:{prop:count,this},1},count,this}}}, {store:{prop:launchcode,this}{midstr:{prop:ascii,this},{store:{dice:94},tempcharval,this}, {prop:tempcharval,this}},launchcode,this}}}Combining MPI with the MUCK properties system can allow for a loop with an indefinite number of iterations. One might place this inside a property named delayloop and then {eval} it:
{delay:{prop:seconds,this},{lit:Hello World{null:{if:{awake:me},{eval:{prop:delayloop,this}}}}}}Read more about this topic: Message Parsing Interpreter
Famous quotes containing the words complex and/or substitution:
“I have met charming people, lots who would be charming if they hadnt got a complex about the British and everyone has pleasant and cheerful manners and I like most of the American voices. On the other hand I dont believe they have any God and their hats are frightful. On balance I prefer the Arabs.”
—Freya Stark (18931993)
“To play is nothing but the imitative substitution of a pleasurable, superfluous and voluntary action for a serious, necessary, imperative and difficult one. At the cradle of play as well as of artistic activity there stood leisure, tedium entailed by increased spiritual mobility, a horror vacui, the need of letting forms no longer imprisoned move freely, of filling empty time with sequences of notes, empty space with sequences of form.”
—Max J. Friedländer (18671958)