"maria j�nsson" <[EMAIL PROTECTED]> wrote
> // Make sure name and number are not NULL:
> if(id=NULL)
> id = "";
> if(name=NULL)
> name = "";
>
Should be:
if(id == NULL)
id = "";
if(name == NULL)
name = "";
You are using an assignment (single =) rather than a test for
equality (double =) in the if statement. You are then assigning
a value to the address you have just set to NULL, producing
the emulator warning which is confusing you.
Your original code is valid C syntax but is often incorrect and,
for that reason, most compilers will produce a warning about
an assignment within a condition.
You should generally run the compiler with all warnings on and
treat any warning as serious. Many warnings are indications that
your code has a fault and the fact that it compiles and can be
run is no guarantee that it's valid.
Chris Tutty
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/