Jump to content

Recommended Posts

Posted (edited)

Q1: What, if any, value does an uninitialized array element get and is it guaranteed?

Q2: How/can do you differentiate a value of zero (0) from the empty string ("") in a condition like (If $x = 0), for example?

Edited by dxt
Posted

A1: the value is a 0 length string

""

A2: you would want to do this:

If $x = "0"

[size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...