Computer Science Canada Procedures and Array help  | 
  
| Author: | illu45 [ Wed Jun 01, 2005 5:17 pm ] | ||
| Post subject: | Procedures and Array help | ||
Hello all, I'm having a problem with calling arrays inside procedures. I know that I can't call an entire array, but I don't know how to call just one of the elements of the array... Here's what I have so far: 
 It crashes at procedure Gethand's ':='s, sayin that hand is not a variable... Any ideas?  | 
	|||
| Author: | Delos [ Wed Jun 01, 2005 6:51 pm ] | ||||
| Post subject: | |||||
 Of course 'hand' is not a variable. You've specified it in your parameters to be a string. Also, you have a Global Variable of the same name, but in the procedure, the local variable (the parameter) is taking precedence. I don't personally like the idea of accessing global variables directly from within a procedure, but anyway... Just change or completely omit the paramter 'hand' from the procedure. I don't see it's use anyway. And actually, you can call an entire array...depending on what context you're thinking of: 
  | 
	|||||