Hi All,
EAGLE's built in functions often use arrays as their parameters yet user
defined functions cannot. The only way to get an array into a function is
to declare the array with global scope so that the function can see it. It
works for some use cases but it's ugly and a bit restricted as you can't
have a generic function which can be called to work on a number of
different arrays, this requires copying local array data into the global
array before calling the function which is messy.
Another thing which would be nice would be being able to have recursive
function calls. I discovered this lack of capability recently and it ended
up causing much more complicated code and initially less functionality than
originally intended because recursion was the natural choice for what I was
trying to achieve.
Finally, and this is linked with recursion, being able to declare function
prototypes before the actual functions code. This way you can have two
functions recursively calling each other which currently you can't do for
two reasons, a) the lack of recursion and b) one of the functions (the
first one declared) doesn't know about the other (as it hasn't been
declared at that point) so throws an error.
I can work around all these issues for the most part but I think addressing
some or all of them would make a lot of things in ULP a lot more straight
forward to implement.
Many thanks,
Rachael
--
Web access to CadSoft support forums at www.eaglecentral.ca. Where the CadSoft EAGLE community meets.