I seem to recall that the number of methods per object is limited to 64.· However, I can't find this documented in the Prop manual.· Can someone point me to where this is documented?
I'm pretty sure we did not document the limitation on methods per object. I'll note that for the next update.
Here's the details:
For each individual object, the total number of methods plus included objects can not exceed 255.
For example,
an object can have 255 methods, but if you create a 256th method, you'll get a compile error.
if that object (with 255 methods) includes an object in its OBJ block, you've exceeded the total of combined methods + objects, and you'll get a compile error.
if an object has 254 methods, it can include, at most, 1 object in it's OBJ block
If an object contains a total of 255 or less combined methods and objects, it can be included by another object without error... and that top object can have it's own set of 254 or less methods (254 methods + 1 object inclusion = 255).
I don't know if there is anything in the Spin language that has a limit of 64.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ --Jeff Martin
· Sr. Software Engineer ·Parallax, Inc.
Post Edited (Jeff Martin (Parallax)) : 4/9/2010 9:15:10 PM GMT
Thanks for the response.· The 64 number may be a nested-loop limit or something else.·· It's good to know we can have up to 255 methods plus objects per object.· I was around 64 methods in one of my objects, and I was concerned about hitting a limit.
I don't know if there is anything in the Spin language that has a limit of 64.
Case statements.
Limit of 64 cases exceeded
Limit of 8 nested blocks exceeded
Limit of 32 unique objects exceeded
Limit of 32 unique DAT files exceeded
Limit of 32 unique PRECOMPILE files exceeded
Limit of 32 unique ARCHIVE files exceeded
Limit of 1024 DAT symbols exceeded
Limit of 16 ELSEIFs exceeded
Limit of 4096 local variables exceeded
Limit of 15 parameters exceeded
Limit of 256 subroutines + objects exceeded
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
Thanks for posting the list of limits.· I know I've seen this before somewhere, but I can't recall where it was.· I just ran into the 16 ELSEIF limit tonight in a command-line parser.· I'll need to restructure my code to get aound that.
Comments
I'm pretty sure we did not document the limitation on methods per object. I'll note that for the next update.
Here's the details:
For each individual object, the total number of methods plus included objects can not exceed 255.
For example,
I don't know if there is anything in the Spin language that has a limit of 64.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Jeff Martin
· Sr. Software Engineer
· Parallax, Inc.
Post Edited (Jeff Martin (Parallax)) : 4/9/2010 9:15:10 PM GMT
Thanks for the response.· The 64 number may be a nested-loop limit or something else.·· It's good to know we can have up to 255 methods plus objects per object.· I was around 64 methods in one of my objects, and I was concerned about hitting a limit.
Dave
Case statements.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
Thanks for posting the list of limits.· I know I've seen this before somewhere, but I can't recall where it was.· I just ran into the 16 ELSEIF limit tonight in a command-line parser.· I'll need to restructure my code to get aound that.
Dave