Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>introduction</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INTRODUCTION

  The functions which do not logically belong to any of the other chapters
  have been combined in this group under the title "Miscellaneous".
  However, this does not in any way mean that they are less important
  functions.  For example, it is possible to activate KEYTIME() or KEYSEC()
  at any given time, or to activate a Clipper procedure after <n> seconds
  have elapsed to carry out a data backup (or control demo programs).
  There are functions allowing the creation of complements, determining
  data types or examining keyboard scan codes.

  Some of these functions allow arguments to be passed by reference and
  will, in this case, behave differently.  Such functions, or the corresponding
  arguments, are designated as reference sensitive in this module, and
  are labeled with (@).

  Passing arguments by reference
  Clipper Summer '87 has the ability to pass character string arguments by
  reference to a user-defined function.  This means that a pointer to the
  original string is passed, and therefore an internal copy will not be made.
  The original will be changed when the function makes changes to such an
  argument.  However, this will only concern user-defined functions, not
  Clipper functions.  Some Clipper Tools One functions allow passing by
  reference and will behave differently.  Such functions, or the corresponding
  arguments, will be designated "reference sensitive" and  are labeled with
  [@].

  Passing arguments by reference has advantages and disadvantages.  The most
  important advantage is the reduction in the memory requirement.  Runtime
  errors, resulting from insufficient memory available for string manipula-
  tion can, in this way, be avoided.

  It is frequently desirable for the original sting to be changed.  The
  copy passed by value will be changed by the function, which then must
  be assigned back to the original:

        var = "Hello"
        var = MYFUNC(var)

  This method will result in excessive storage space and time, particularly
  for very long strings:

        The reference method:

        var = "Hello"
        MYFUNC(@var)

  It does not make any sense to transfer arguments to functions by reference
  in most Clipper Tools One functions.  However, in some cases, it does make
  a difference when the argument has been transferred in this manner.  The
  functions will change the transferred string directly.  Memory space will
  be saved and the functions will operate faster.  Note the "@" qualifier
  for reference sensitive.



Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson