I've run into to a problem, which i'm sure there is an easy answer too, but, because of my lack of knowledge in purebasic, I'm having difficulty!
so if anyone could offer some enlightenment it would be much appreciated
I have three structs
Code: Select all
Structure dataStats
        max,i
        min.i
        longest.d
        shortest.d
endstructure
Structure testStats
         stat1.dataStats ;<- variable of type struct 
         Array ghouls.w (6)
Endstructure
Structure boreStats
        stat2.dataStats ;<- variable of type struct 
        wami.i
        freq.i
        Array fiends.w(10)
EndStructure
Global Dim idx.testStats (4) ; i creat globals to ease any hassle
Global Dim odx.boreStats (7)
and both contain arrays
can anyone say how i can just pass the variable of type struct contained in the other structures
to a function, and also, how i can pass only the array to a procedure
i.e.
Code: Select all
Procedure testfiends( *pointer_to_structure.dataStats)
;update le stats
*pinter_to_structure\longest= 2
endprocedure
Procedure checkarray( *pointer_to_array )
;update le array
test = ArraySize( *pointer_to_array )
*pointer_to_array(2) = 4
endprocedure
testfiends ( @odx\stat2 ) ; ? like this does not work for me or @(odx\stat2)
testfiends ( @idx\stat1 )
checkarray ( @odx.fiends() ) ; pass arrays?
any insight is appreciated
best regards
Dazbo


