In your code you use the byte variable "C" but I don't see it declared.
Did you include "MODEDEFS.BAS" in your code?
Code:
num var byte[12]
For c=0 to 12 ' you will need 13 bytes here
sum[c+8]=num[c]
next c
How long is your phone number? You have declared an array (num) of 12 bytes but the for/next loop is trying to use 13 bytes!
Also the array sum is declared for 21 and you are attempting to use 22 (you have sum[21]= 13) This is an array of 22 bytes!
Remember that you have to count also the zero.
So adjust both the arrays as per the lenght of your phone number ( if 13 digits then you need 13 in the declaration and 13 in the string numerical. If on the contrary the phone lenght is 12 digits then modify the for/next loop to For c=0 to 11 and put byte array sum var byte[22]
Al.
Last edited by aratti; - 7th October 2009 at 23:18.
All progress began with an idea
Bookmarks