Your idea is commonly referred to as "jump islands" or "code islands". They
can be a pain to maintain, but are a valid solution to the problem.
Personally, I would switch to multiple segments before resorting to jump
islands, but there are cases were you need both. As mentioned in other
threads, there are some things that have to be in the first segment. For
some applications, it can be difficult to keep the first segment under 32K.
In this case, jump islands are arguably preferable to switching to the smart
code model. You can usually get away with just arranging your first segment
carefully.

Note that some of the calls to long math are a result of indexing. In this
case, you'll have to "spell out" the indexing in terms of the underlying
math. Once you're going through the trouble, you may find you can avoid the
long math because you know the bounds of the array.

See http://oasis.palm.com/dev/kb/faq/1418.cfm for a reference to code
islands.
--
Danny Epstein
OS Engineer, Palm Inc.



"Jacky Cheung" <[EMAIL PROTECTED]> wrote in message
news:40089@palm-dev-forum...
> By the way, if it is impossible for you to move your code towards the
> beginning (eg. you may cause problems for other files),
> you may consider writing function such as:
>
> Long MUL(Long a, Long b)
> {
>   return a*b;
> }
>
> which is put closer to the beginning and your code can call this function
> instead.
>
> Please correct me if this is a bad idea.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to