Previous Thread
Next Thread
Print Thread
907010/fnmlistxml.bsi #35073 24 Mar 22 04:01 PM
Joined: Jun 2001
Posts: 3,375
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,375
Compiling a program with this BSI, triggered an error in line 472 about Collection needing ():

Function Fn'XMList'Walk($xml as mlist(varstr), &
@fn'callback() as lblref, &
level=0 as b2:inputonly, &
parent$=.null as s0:inputonly) as i4

I had to add () to the $xml parameter.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: 907010/fnmlistxml.bsi [Re: Jorge Tavares - UmZero] #35074 24 Mar 22 04:20 PM
Joined: Jun 2001
Posts: 11,644
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,644
Good timing on this. I recently stumbled on a variation of this problem involving function calls with named array parameters, where the compiler was failing to enforce the normal rule requiring () on arrays, which led to a series of compiler patches (you can read about them in the notes below). The case you found is kind of harmless since there's no ambiguity over whether $xml is a collection or not. But in the case of regular arrays, there is a difference. The variables abc and abc() are not the same!

You can use the latest APN compiler below; full updates of the A-Shell package are still in the works...

ash65notes.txt
compil-6.5.977-w32.zip


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3