Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Functions properly
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Using Functions properly
Divers
Thread ID:
00135982
Message ID:
00135982
Vues:
47
I seem to be having a little trouble implimenting functions the way I used to before OOP.

Im my MAIN program. I SET PROCEDURE TO procedrs ADDITIVE

Within procedrs, I have a function that looks like this:
FUNCTION Binarize
PARAMETERS number,length
PRIVATE retval,digit
retval=''

......
number = number - (digit*65536)
......

RETURN PADL(RetVal,Length,CHR(0))


Later, in the INIT of a form, I call the function thus:
PRIVATE NewKey
NewKey=''
DO WHILE INDEXSEEK(NewKey,"Consults","Index")
WAIT WINDOW "About to Binarize"
NewKey=Binarize(INT(RAND()*1000000000),3)
WAIT WINDOW "Performed Binarize"
ENDDO
INSERT INTO Consults (index, name) ;
VALUES (NewKey, mbhCompany)


And I always get a: Function argument value, type or count is invalid from VFP6. Could someone give me a hint regarding the error of my ways?

TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform