Hi
   I think this is and array index problem. ok assume, if  the string stored
in temp_store_number not in this array means what will happen, the counter
variable become more than ur 950 (array limit). so this error may occur. i'm
not sure this is the actual cause, anyhow think abt array index. just try to
change the while loop as below.

while(array_of_store_numbers[counter][0] != '\0' && !found && counter < 950)
{
...
...
}

Regards,
N.Pandiaraj

----- Original Message -----
From: "Jordon Marshall" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 11:41 PM
Subject: Fatal Exception -- HELP


> I am very new to Palm development, and I am having some pretty big
problems.
> I am trying to search the following array to find a number that matches
the
> users input into a field.  The problem is that the code below gives me a
> "Fatal Exception".  The problem that I am encountering is that this error
is
> not consistant in any way.  Some times it will happen when I input a
number
> once, other times it takes 20 or more tries to break it.  Anyone have any
> input to help a newbie.  Try not to go too far over my head if you reply,
I
> understand C++ very well but not Palm OS.
>
> Thank You
>
>
> char array_of_store_numbers[950][10] = {
> "6489", "14280", "16496", "21374", "5006", "5186", "2666", "14262",
"5332",
> "15684",
> "18058", "20938", "19158", "19952", "21375", "17387", "18045", "17755",
> "19576", "20999",........
>
>
> while(array_of_store_numbers[counter][0] != '\0' && !found)
> {
> if(strcmp(array_of_store_numbers[counter], temp_store_number) == 0)
>

> found = 1;
>
> FldSetInsPtPosition(GetObjectPtr(StoreCheckAcctField),0);
> FrmSetFocus(FrmGetActiveForm(),StoreCheckAcctField);
> FldGrabFocus(GetObjectPtr(StoreCheckAcctField));
> SetFieldText( StoreCheckAcctField, "-LOWES", 79, true );
>
> }
> counter++;
> }
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to