PDA

View Full Version : Dir



Joe123
06-14-2008, 06:46 AM
Why does it say that 'writing to Dir is currently undefined' in ZScript.txt?

It's always worked when I've tried it...

_L_
06-14-2008, 08:21 AM
Saying something is undefined... means that the developers reserve the right to change that behaviour if the necessity springs up. But most of the time it means that the developers haven't sanitised the functions to ensure that those out-of-range inputs don't mess stuff up.

Joe123
06-14-2008, 08:54 AM
Oh right.

So it doesn't mean 'won't work' then?

beefster09
06-14-2008, 05:12 PM
Yeah. I wondered about that. Kinda weird terminology.

DarkDragon
06-14-2008, 05:37 PM
It's a technical term, and basically means "we won't stop you from writing to this variable, but we don't guarantee anything will or won't happen if you do. It might work fine on some enemies, give Link 100 rupees on others, and crash the game on yet others. It might work fine in this build, and crash the game in the next build. It might work fine on some computers, and crash the game on others."

If you're familiar with C, reading from an uninitialized variable, or a statement like "int x = y++ + y++;" are other examples of undefined behavior.