A-Shell Network

907010/fnmlistxml.bsi

Posted By: Jorge Tavares - UmZero

907010/fnmlistxml.bsi - 24 Mar 22 04:01 PM

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.
Posted By: Jack McGregor

Re: 907010/fnmlistxml.bsi - 24 Mar 22 04:20 PM

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
© 2024 A-Shell Forum