Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Technical Reference - <b>_storc()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _storc()
 Assign a character value to a referenced variable using a null-terminated
 string
------------------------------------------------------------------------------
 C Prototype

     #include "extend.api"
     int _storc(
                  char far * fpString,
                  int iParamNum
                  [, int iArrayIndex]
               )

 Arguments

     fpString is a far pointer to a null-terminated string representing
     the character value to be assigned.

     iParamNum is the one-based ordinal position in the parameter list of
     the parameter to be assigned.

     iArrayIndex is an array index that specifies a particular element if
     the iParamNum parameter is an array.

 Returns

     _storc() returns one if the function is successful; otherwise, it
     returns zero.

 Description

     _storc() stores a character value to a variable passed by reference as a
     parameter from CA-Clipper.  If the parameter specified by iParamNum is
     not passed by reference, _storc() ignores the call and returns a value
     of zero.

     _storc() determines the logical length of the character value by
     scanning the supplied string for a null terminator byte.  If you are
     attempting to assign binary data that may contain embedded null bytes,
     use _storclen() instead.

     Note:  _storc() automatically allocates memory in the CA-Clipper
     heap and makes a copy of the supplied string.  The string need not be
     preserved after the call to _storc().

 Examples

     .  From C:

        _storc("hello world", 1);

     .  From Assembly language:

        EXTRN __storc:FAR
              mov   ax, 1                ; iParamNum
              push  ax
              mov   dx, seg MyString     ; pass address of string
                                         ; (creation of string not shown)
              mov   ax, offset MyString
              push  dx
              push  ax
              call  __storc
              add   sp, 6                ; reset stack pointer

 Files:  Library is CLIPPER.LIB, header file is Extend.api.


See Also: _parc() _parclen() _retc() _retclen() _storclen()

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