hi
pass the matriz to the function as a parameter:
do only 2 changes, the 2 lines commented!
cheers
Juan
pass the matriz to the function as a parameter:
Graphics 640,480,16,2 Type matriz Field x[5] Field y[5] Field name$ [5] End Type Global x,y, name$ w.matriz = New matriz w\x[1] = 10 w\y[1] = 8 w\name$[1] = "poken" w\x[2] = 6 w\y[2] = 1 w\name$[2] = "branki" w\x[3] = 5 w\y[3] = 11 w\name$[3] = "kriyun" w\x[4] = 2 w\y[4] = 9 w\name$[4] = "Klussy" w\x[5] = 12 w\y[5] = 19 w\name$[5] = "Blidnken" For j=1 To 5 Print Str$(j) + " x="+ Str$(w\x[j])+ " y=" +Str$(w\y[j])+ " "+ w\name$[j] Next show(w) ;send W as a parameter WaitKey End Function show(pf.matriz) ;acept a type matiz variable For j=1 To 5 Print Str$(j) + " x="+ Str$(pf\x[j])+ " y=" +Str$(pf\y[j])+ " "+ pf\name$[j] Next End Function
do only 2 changes, the 2 lines commented!
cheers
Juan