View Single Post
Old 16 January 2018, 22:54   #63
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
1: Not that I know of. You can use the Shared keyword to allow the procedure to access the same list as the main program. Newtypes can be passed as a pointer, but I don't think lists can be assigned to pointers so I don't think passing a list is possible. Maybe someone else knows a way though?

2: No, only indexed arrays can be declared within a function. As before however, you can use a global list with the Shared keyword, so long as you remember to clear it each time and don't do any recursion.

3: Hmmm, looks like a bug. What version of Blitz are you using? I vaguely remember in the AmiBlitz changenotes that there was a fix for some bug in parameter passing that you may have stumbled upon. It looks like a mismatch of types that's not getting picked up by the compiler / debugger. I would suggest always declaring types for parameters like that, and that should avoid the problem:

Statement test{c.b, r.b, w.b, h.b}
Daedalus is offline  
 
Page generated in 0.04767 seconds with 11 queries