Professional Documents
Culture Documents
Advantages of Functions:
Disadvantages of Functions:
vi) While adding a user function can speed up code that is best written in
C rather than a scripting language, it is not always the best choice for
implementation:
vii) It requires the programmer to be well versed in C, including pointers,
function pointers, dynamic memory allocation, and debugging. Often the headaches
C causes, especially for the neophyte, far outweigh any run-time savings. Bugs in
the code might not manifest themselves until well after the C function ends, making
debugging a nightmare.
viii) There may not be any speed advantage. Vortex is pretty fast at most
operations; for small functions it may be just as fast - and much easier - to write the
function in Vortex. Since Vortex already has powerful data processing functions,
and the ability to execute external programs, it may be faster to <EXEC> the C code
in a separate program and parse it in Vortex, especially as a quick prototype.
ix) It's less portable. A C function means a new Vortex executable must
be made if the hardware platform changes. Other Vortex users won't have the custom
function in their taxis executable.
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest