Structure in Prorotype (Structure not found)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Leonhard
User
User
Posts: 55
Joined: Fri Jun 16, 2006 7:43 am

Structure in Prorotype (Structure not found)

Post by Leonhard »

Code: Select all

Prototype proto(*pram.str1, *pram.str2)

Structure str1
  *s.str2
  
EndStructure

Structure str2
  l.l
EndStructure
Is the Error in the first line really nessesary?
When I comment this line is the code OK (although I use str2 in the str1 - Structure).
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

It should be written as

Code: Select all

Structure str1 
  *s.str2 
  
EndStructure 

Structure str2 
  l.l
EndStructure
Prototype proto(*pram.str1, *pram2.str2)
but I know you know that.

and indeed, I see no simple solution for things like

Code: Select all

Structure str1 
  *s.str2 
  
EndStructure 
Prototype proto(*pram.str1, *pram2.str2) 
Structure str2 
  l.proto
EndStructure
Athlon64 3700+, 1024MB Ram, Radeon X1600
Post Reply