On 22/04/2006, at 12:37 AM, Joe Huber wrote:
RB works great for large apps. But good coding practice says that
individual methods should be small if at all possible. My rule is
one page of code max per method or event. If it doesn't fit on my
screen I refactor it.
I generally follow that approach although have violated it at times,
mainly due to the lack of inline functions in RB.
However, it was my understanding that the problem has now been
identified as NOT just code size but complexity, as quoted below.
I don't consider 123 lines excessive!
Code-generators often generate both large and complex methods,
treating the target language more as an intermediate compilation step
than something to be maintained by hand. As a beta tester of
CodeWarrior for many years I will confirm that such users of the
compiler occasionally ran into problems not experienced by the rest
of us, you can also probably find some discussions on the Google
archives of group comp.sys.mac.programmer.codewarrior . I can excuse
RB a little from not having the stability of a C compiler (eg: a
single function exceeding 32kb of text) but I think the complexity
but that Andre idenfitied as a course is entirely reasonable as a
level of complexity they should deal with.
Am 20.04.2006 um 14:17 schrieb Andre Tracksdorf:
i found today the cause of this problem in our project:
It was not a too long method or line continuations in source code,
but a nested if-statement as follows:
for each...
if (...) then
if (...) then
select case ...
case ...
case ...
case ...
case ...
if (...) then <<<< THIS BLOCK CAUSES THE ASSERTION 1815
end if
end select
end if
end if
next
The entire method has 123 lines. After 'outsourcing' the mentioned
if-block in a extenal method the problem was solved!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>