[<<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.h"
     int _storc(char *string, int paramNum [, int arrayIndex])

 Arguments

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

     paramNum is the position in the parameter list of the parameter to
     be assigned.

     arrayIndex is an array index to specify a particular element if the
     indicated 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 Clipper variable passed by
     reference as a parameter from Clipper.  If the parameter specified by
     paramNum is not a Clipper variable 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().

     -----------------------------------------------------------------------
     . Note

     _storc() automatically allocates memory in the 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             ; paramNum
       push  ax
       mov   dx, seg MyString  ; pass address 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.h.

See Also: _parc() _parclen() _retc() _retclen() _storclen()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson