G:/ScriptBasic/source/commands/string.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include "../command.h"
#include "../match.h"
#include "../matchc.h"

Go to the source code of this file.

Data Structures

struct  _JoinItem
struct  _formatParams

Defines

#define FMT_xMIN   1e-8
#define FMT_xMAX   1e+9
#define FMT_RND   9
#define FMT_xRND   1e+9
#define FMT_xRND2   1e+8
#define INITIALIZE
#define CHUNK_SIZE   1024
#define F_MINUS   1
#define F_PLUS   2
#define F_ZERO   4
#define F_BLANK   8
#define F_SHARP   16
#define FORMAT_SYNTAX_ERROR   iErrorCode = COMMAND_ERROR_ARGUMENT_RANGE; goto error_escape;
#define ASSERT_PARAMETER_COUNT   if (iArg >= cParameters) {iErrorCode = COMMAND_ERROR_FEW_ARGS; goto error_escape;}
#define CHECK_MEM(x)   if (!check_size(&params,(x))){iErrorCode = COMMAND_ERROR_MEMORY_LOW; goto error_escape;}
#define CHECK_OPERATION(x)   if (!x){iErrorCode = COMMAND_ERROR_MEMORY_LOW; goto error_escape;}
#define GETNPARAM
#define NEXTCHAR   STRINGVALUE(RESULT)[ iResult < cbResult ? iResult++ : cbResult ]
#define GETLEFTVALUE

Typedefs

typedef _formatParams formatParams
typedef _formatParamspFormatParams

Functions

static int SUBSTRCMP (char *a, char *b, long length, int iCase)
 while (s &&lLen)
 if (memory_IsUndef(Op1))
 LONGVALUE (RESULT)
 while (lLen--)
 while (lLen &&isspace(*r)) r++
 while (lLen)
 while (lStringLength--)
 while (lStringLength &&isspace(r[lStringLength-1])) lStringLength--
 while (lStringLength)
 if (lStringLength)
 if (memory_IsUndef(Op2))
 if (nItem)
 if (memory_IsUndef(Op3))
 while (lStart-1<=lLength-lStringLength)
 if (lLength< lStringLength)
 if (memory_IsUndef(Op4))
 if (memory_IsUndef(Op5))
 if (!ReplaceAll &&lCalculatedRepetitions > lRepetitions) lCalculatedRepetitions
 if (lStart > 1)
 while (lStart<=lLength)
 while (lLength)
 if (STRLEN(Op)==0)
 if (Op==NULL)
 if (lCode==0)
 sprintf (STRINGVALUE(RESULT),"%*X", lLength, lStore)
 STRLEN (RESULT)
 while (lStore)
 if (memory_IsUndef(WholeString)||STRLEN(WholeString)==0L)
 if (memory_IsUndef(Delimiter)||STRLEN(Delimiter)==0)
 if (ResultArray==NULL)
 FREE (Temp)
 if (!nItem)
 if (!(CDR(nItem)))
 while (JoinItem)
int initialize_like (pExecuteObject pEo)
static int allocate_MatchSets (pExecuteObject pEo)
 if (memory_IsUndef(Op1)||!match_index(JokerCharacter=*STRINGVALUE(Op1)))
 match_ModifySet (pLastResult->pThisMatchSets, JokerCharacter, pL,(unsigned char *) p, MATCH_ADDC|MATCH_SSIJ|MATCH_NULS)
 match_ModifySet (pLastResult->pThisMatchSets, JokerCharacter, pL,(unsigned char *) p, MATCH_ADDC|MATCH_SMUJ|MATCH_NULS)
 if (cArraySize > pLastResult->cArraySize)
 if (iErrorCode)
 if (memcpy((RESULT) STRINGVALUE(Op1)[StringLen-1]== '\n')
 memcpy (STRINGVALUE(RESULT), pLastResult->ParameterArray[index], pLastResult->pcbParameterArray[index])
 if (memory_IsUndef(vOptionValue))
 options_Set (pEo, pszOptionName, lOptionValue)
 CONVERT2ZCHAR (Op1, buffer)
 FREE (buffer)
 if (plOptionValue)
int check_size (pFormatParams params, long len)
int printInt (pFormatParams params)
int printDouble (pFormatParams params)
int printChar (pFormatParams params)
static double fint (double x)
static double frac (double x)
static int sgn (double x)
static int zsgn (double x)
static double fround (double x, int dig)
static void fptoa (double x, char *dest)
static void rmzeros (char *buf)
static void bestfta_p (double x, char *dest, double minx, double maxx)
static void bestfta (double x, char *dest)
static void expfta (double x, char *dest)
static void fmt_nmap (int dir, char *dest, char *fmt, char *src)
static void fmt_omap (char *dest, const char *fmt)
static int fmt_cdig (char *fmt)
static int format_num (char *dest, const char *fmt_cnst, double x)
 while (nItem)
 if (cParameters)
 while (size > 0)
 FREE (pvArgs)
 if (RESULT==NULL)
 memcpy (STRINGVALUE(RESULT), params.buf, params.bufPtr)
 free (params.buf)
 if (params.buf) free(params.buf)
 ERROR (iErrorCode)
static END unsigned long TruncatedLength (int lLen, unsigned long iArgStr)
 while (iStr< STRLEN(vFormat))
 if (!memory_IsUndef(vRecord)&&!memory_IsUndef(vFormat))
 CONVERT2ZCHAR (Argument, pszKey)
 if (pszSecKey==NULL)
 if (iError==COMMAND_ERROR_SUCCESS)
 FREE (pszKey)
 if (iError||type==CFT_NODE_BRANCH) ERROR(COMMAND_ERROR_ARGUMENT_RANGE)
 switch (type)

Variables

static double nfta_eplus []
static double nfta_eminus []
NODE nItem
VARIABLE Op1
VARIABLE Op2
long lFinalStringLength
long lLen
char * s
char * r
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 ASSERTOKE
 nItem = CDR(nItem)
 Op2 = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 ASSERTOKE
 lFinalStringLength = Op1 ? STRLEN(Op1) : 0
 lFinalStringLength = Op2 ? STRLEN(Op2) : 0
 RESULT = NEWMORTALSTRING(lFinalStringLength)
 r = STRINGVALUE(RESULT)
 s = Op1 ? STRINGVALUE(Op1) : NULL
 lLen = Op1 ? STRLEN(Op1) : 0
 s = Op2 ? STRINGVALUE(Op2) : NULL
 lLen = Op2 ? STRLEN(Op2) : 0
END NODE nItem
VARIABLE Op1
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 RESULT = NEWMORTALLONG
END NODE nItem
VARIABLE Op1
char * r
unsigned long lLen
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 RESULT = Op1
 r = STRINGVALUE(RESULT)
 lLen = STRLEN(RESULT)
END NODE nItem
VARIABLE Op1
char * r
unsigned long lLen
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 RESULT = Op1
 r = STRINGVALUE(RESULT)
 lLen = STRLEN(RESULT)
END NODE nItem
VARIABLE Op1
char * r
char * s
unsigned long lStringLength
unsigned long lLen
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 r = STRINGVALUE(Op1)
 lLen = STRLEN(Op1)
 lLen
 s = r
 lStringLength = 0
 RESULT = NEWMORTALSTRING(lStringLength)
 r = STRINGVALUE(RESULT)
 Op1 = CONVERT2STRING(Op1)
 r = STRINGVALUE(Op1)
 lStringLength = STRLEN(Op1)
 RESULT = NEWMORTALSTRING(lStringLength)
 r = STRINGVALUE(RESULT)
 s = STRINGVALUE(Op1)
END NODE nItem
VARIABLE Op1
char * r
char * s
unsigned long lStringLength
unsigned long lLen
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 r = STRINGVALUE(Op1)
 lLen = STRLEN(Op1)
 lStringLength = STRLEN(Op1)
 lLen
 lStringLength
 s = r
 RESULT = NEWMORTALSTRING(lStringLength)
 r = STRINGVALUE(RESULT)
END NODE nItem
VARIABLE Op1
VARIABLE Op2
VARIABLE Op3
long lStart
long lLength
long lStringLength
char * r
char * s
int iCase = OPTION("compare")&1
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 nItem = CDR(nItem)
 lLength = STRLEN(Op1)
 r = STRINGVALUE(Op1)
 Op2 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op2 = CONVERT2STRING(Op2)
 nItem = CDR(nItem)
 lStringLength = STRLEN(Op2)
 s = STRINGVALUE(Op2)
 Op3 = NULL
 RESULT = NULL
 RETURN
END NODE nItem
VARIABLE Op1
VARIABLE Op2
VARIABLE Op3
long lStart
long lLength
long lStringLength
char * r
char * s
int iCase = OPTION("compare")&1
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 nItem = CDR(nItem)
 lLength = STRLEN(Op1)
 r = STRINGVALUE(Op1)
 Op2 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op2 = CONVERT2STRING(Op2)
 nItem = CDR(nItem)
 lStringLength = STRLEN(Op2)
 s = STRINGVALUE(Op2)
 Op3 = NULL
 RESULT = NULL
 RETURN
END NODE nItem
VARIABLE Op1
VARIABLE Op2
VARIABLE Op3
VARIABLE Op4
VARIABLE Op5
long lRepetitions
long lCalculatedRepetitions
int ReplaceAll
long l_start
long lStart
long lLength
long lSearchLength
long lReplaceLength
long lResult
char * r
char * s
char * q
char * w
int iCase = OPTION("compare")&1
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 nItem = CDR(nItem)
 lLength = STRLEN(Op1)
 r = STRINGVALUE(Op1)
 Op2 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op2 = CONVERT2STRING(Op2)
 nItem = CDR(nItem)
 lSearchLength = STRLEN(Op2)
 s = STRINGVALUE(Op2)
 Op3 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op3 = CONVERT2STRING(Op3)
 lReplaceLength = STRLEN(Op3)
 nItem = CDR(nItem)
 w = STRINGVALUE(Op3)
 Op4 = NULL
 Op5 = NULL
 lResult = STRLEN(Op1) + lCalculatedRepetitions * (lReplaceLength-lSearchLength)
 RESULT = NEWMORTALSTRING(lResult)
 lStart = l_start
 q = STRINGVALUE(RESULT)
END NODE nItem
VARIABLE Op1
VARIABLE Op2
VARIABLE Op3
long lStart
long lLength
long lStringLength
char * r
char * s
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 nItem = CDR(nItem)
 Op2 = EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 nItem = CDR(nItem)
else lLength = -1
 lStart
 lStringLength = STRLEN(Op1)
END NODE nItem
VARIABLE Op1
long lLength
long lStringLength
char * r
char * s
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 nItem = CDR(nItem)
 lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 ASSERTOKE
END NODE nItem
VARIABLE Op1
long lLength
long lStringLength
char * r
char * s
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 nItem = CDR(nItem)
 lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 ASSERTOKE
 RESULT = NEWMORTALSTRING(lStringLength)
 r = STRINGVALUE(RESULT)
END NODE nItem
long lLength
char * r
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 ASSERTOKE
END NODE nItem
VARIABLE Op
long lLength
char cFill
char * r
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 ASSERTOKE
 r = STRINGVALUE(RESULT)
END long lCharCode
 USE_CALLER_MORTALS
 lCharCode = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(PARAMETERLIST))))
 ASSERTOKE
 lCharCode = 256
 Op = CONVERT2STRING(Op)
 lCharCode = (unsigned char)*(STRINGVALUE(Op))
 RESULT = NEWMORTALLONG
END NODE nItem
VARIABLE Op1
long lStringLength
char * r
char * s
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 ASSERTOKE
 Op1 = CONVERT2STRING(Op1)
 s = STRINGVALUE(Op1)
 lStringLength = STRLEN(Op1)
 s = lStringLength-1
 RESULT = NEWMORTALSTRING(lStringLength)
 r = STRINGVALUE(RESULT)
END VARIABLE Op
 USE_CALLER_MORTALS
 Op = _EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 ASSERTOKE
 RESULT = CONVERT2STRING(Op)
END unsigned long lCode
unsigned long lLength
unsigned long lStore
VARIABLE Op
 USE_CALLER_MORTALS
 Op = EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 ASSERTOKE
 lCode = LONGVALUE(CONVERT2LONG(Op))
 lStore = lCode
 lLength = 0
 RESULT = NEWMORTALSTRING(lLength+1)
END unsigned long lCode
unsigned long lLength
unsigned long lStore
char * s
VARIABLE Op
 USE_CALLER_MORTALS
 Op = EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 ASSERTOKE
 lCode = LONGVALUE(CONVERT2LONG(Op))
 lStore = lCode
 lLength = 0
 RESULT = NEWMORTALSTRING(lLength)
 s = STRINGVALUE(RESULT) + lLength -1
END VARIABLE WholeString
END VARIABLE Delimiter
END VARIABLE Quoter
END VARIABLE ResultArray
LEFTVALUE Array
unsigned long i
unsigned long lChunkCounter
unsigned long iStart
unsigned long iCount
long refcount
char * Temp
 WholeString = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Delimiter = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Quoter = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Array = EVALUATELEFTVALUE_A(PARAMETERNODE)
 ASSERTOKE
Array = ResultArray
END VARIABLE WholeString
END VARIABLE Delimiter
END VARIABLE ResultArray
LEFTVALUE Array
unsigned long i
unsigned long lChunkCounter
unsigned long iStart
long refcount
 WholeString = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Delimiter = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Array = EVALUATELEFTVALUE_A(PARAMETERNODE)
 ASSERTOKE
Array = ResultArray
END NODE nItem
VARIABLE WholeString
VARIABLE Delimiter
LEFTVALUE LeftValue
unsigned long i
unsigned long iStart
long refcount
 WholeString = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Delimiter = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 nItem = PARAMETERNODE
char * s
VARIABLE vJoiner
VARIABLE vStringArray
int iFirstLoop
_JoinItemJoinItem
_JoinItem ** pJoinItem
_JoinItemJoinFree
unsigned long lResultLength
unsigned long lItemNumber
unsigned long i
 JoinItem = NULL
 pJoinItem = &JoinItem
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 vJoiner = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 ASSERTOKE
 nItem = CDR(nItem)
 RESULT = NEWMORTALSTRING(lResultLength)
 s = STRINGVALUE(RESULT)
VARIABLE Op1
VARIABLE Op2
pPatternParam pLastResult
char JokerCharacter
char * p
unsigned long pL
 INITIALIZE
 Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Op2 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
END VARIABLE Op1
END VARIABLE Op2
pPatternParam pLastResult
char JokerCharacter
char * p
unsigned long pL
 INITIALIZE
 Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 Op2 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
END VARIABLE Op1
pPatternParam pLastResult
char JokerCharacter
 INITIALIZE
 Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 iError
 StringLen = STRLEN(Op1)
 index
 RESULT = NEWMORTALSTRING(pLastResult->pcbParameterArray[index])
END char * pszOptionName
long lOptionValue
VARIABLE vOptionValue
 pszOptionName = pEo->StringTable+pEo->CommandArray[_ActualNode-1].Parameter.CommandArgument.Argument.szStringValue
 NEXTPARAMETER
 vOptionValue = CONVERT2LONG(EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 lOptionValue = LONGVALUE(vOptionValue)
END VARIABLE Op1
unsigned long * plOptionValue
char * buffer
 USE_CALLER_MORTALS
 Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(PARAMETERLIST)))
 ASSERTOKE
 plOptionValue = OPTIONR(buffer)
else RESULT = NULL
unsigned long cParameters
unsigned long iArg
char * ptr
char * p
long size
formatParams params
VARIABLE vFormat
VARIABLE * pvArgs
NODE nItem
char fmt [128]
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 vFormat = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 ASSERTOKE
 nItem = CDR(nItem)
 cParameters = 0
else pvArgs = NULL
 nItem = CDR(PARAMETERLIST)
 iArg = 0
 iArg = 0
params buf = (char*)malloc(CHUNK_SIZE)
params bufSize = CHUNK_SIZE
params bufPtr = 0
 ptr = STRINGVALUE(vFormat)
 size = STRLEN(vFormat)
 RESULT = NEWMORTALSTRING(params.bufPtr)
 RETURN
error_escape __pad0__
NODE nItem
VARIABLE vFormat
VARIABLE * pvArgs
unsigned long cParameters
unsigned long cbResult
unsigned long iArg
unsigned long iStr
unsigned long iArgStr
unsigned long iResult
unsigned long lLen
unsigned long lLenS
long lParam
unsigned long uParam
int fLen
char cChar
double dParam
unsigned char * pszD
 USE_CALLER_MORTALS
 nItem = PARAMETERLIST
 vFormat = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 ASSERTOKE
 nItem = CDR(nItem)
 cParameters = 0
else pvArgs = NULL
 nItem = CDR(PARAMETERLIST)
 iArg = 0
 iStr = 0
 iArg = 0
 cbResult = 0
 RESULT = NEWMORTALSTRING(cbResult)
 iStr = 0
 iArg = 0
 iResult = 0
NODE nItem
VARIABLE vRecord
VARIABLE vFormat
LEFTVALUE LeftValue
unsigned long lLen
unsigned long iStr
unsigned long iRec
unsigned long lLenS
unsigned long lMag
unsigned long i
int fLen
int iThisChar
long refcount
 vRecord = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 vFormat = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 ASSERTOKE
 NEXTPARAMETER
 nItem = PARAMETERNODE
END char * pszConf
long lConf
double dConf
int type
int iError
char * pszKey
char * pszSecKey
VARIABLE Argument
int i
int j
 Argument = EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 ASSERTOKE
 Argument = CONVERT2STRING(Argument)
 pszSecKey = ALLOC(STRLEN(Argument)+2)
 iError = cft_GetEx(pEo->pConfig,pszSecKey,NULL,&pszConf,&lConf,&dConf,&type)
 iError = cft_GetEx(pEo->pConfig,pszKey,NULL,&pszConf,&lConf,&dConf,&type)
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED
END NOTIMPLEMENTED


Define Documentation

#define ASSERT_PARAMETER_COUNT   if (iArg >= cParameters) {iErrorCode = COMMAND_ERROR_FEW_ARGS; goto error_escape;}
 

Definition at line 2551 of file string.c.

Referenced by while().

#define CHECK_MEM  )     if (!check_size(&params,(x))){iErrorCode = COMMAND_ERROR_MEMORY_LOW; goto error_escape;}
 

Definition at line 2552 of file string.c.

Referenced by while().

#define CHECK_OPERATION  )     if (!x){iErrorCode = COMMAND_ERROR_MEMORY_LOW; goto error_escape;}
 

Definition at line 2553 of file string.c.

Referenced by while().

#define CHUNK_SIZE   1024
 

Definition at line 2544 of file string.c.

Referenced by check_size().

#define F_BLANK   8
 

Definition at line 2548 of file string.c.

Referenced by printDouble(), printInt(), and while().

#define F_MINUS   1
 

Definition at line 2545 of file string.c.

Referenced by printChar(), printDouble(), printInt(), and while().

#define F_PLUS   2
 

Definition at line 2546 of file string.c.

Referenced by printDouble(), printInt(), and while().

#define F_SHARP   16
 

Definition at line 2549 of file string.c.

Referenced by printDouble(), printInt(), and while().

#define F_ZERO   4
 

Definition at line 2547 of file string.c.

Referenced by printChar(), printDouble(), printInt(), and while().

#define FMT_RND   9
 

Definition at line 33 of file string.c.

#define FMT_xMAX   1e+9
 

Definition at line 32 of file string.c.

Referenced by bestfta().

#define FMT_xMIN   1e-8
 

Definition at line 31 of file string.c.

Referenced by bestfta().

#define FMT_xRND   1e+9
 

Definition at line 34 of file string.c.

#define FMT_xRND2   1e+8
 

Definition at line 35 of file string.c.

#define FORMAT_SYNTAX_ERROR   iErrorCode = COMMAND_ERROR_ARGUMENT_RANGE; goto error_escape;
 

Definition at line 2550 of file string.c.

Referenced by while().

#define GETLEFTVALUE
 

Value:

if( nItem ){LeftValue = EVALUATELEFTVALUE_A(CAR(nItem));\
                     ASSERTOKE;\
                     DEREFERENCE(LeftValue);\
                     if( *LeftValue != NULL )\
                       memory_ReleaseVariable(pEo->pMo,*LeftValue);\
                     nItem = CDR(nItem);}else LeftValue = NULL;

Definition at line 3845 of file string.c.

Referenced by if().

#define GETNPARAM
 

Value:

lLen = 0; fLen = 0;\
          while( iStr < STRLEN(vFormat) && isdigit(STRINGVALUE(vFormat)[iStr]) ){\
            lLen = 10*lLen + STRINGVALUE(vFormat)[iStr] - '0';\
            fLen=1;\
            iStr++;\
            }

Definition at line 3482 of file string.c.

Referenced by if(), and while().

#define INITIALIZE
 

Value:

if( initialize_like(pEo) )ERROR(COMMAND_ERROR_MEMORY_LOW); \
                     pLastResult = (pPatternParam)PARAMPTR(CMD_LIKEOP);

Definition at line 1925 of file string.c.

#define NEXTCHAR   STRINGVALUE(RESULT)[ iResult < cbResult ? iResult++ : cbResult ]
 

Definition at line 3696 of file string.c.


Typedef Documentation

typedef struct _formatParams formatParams
 

typedef struct _formatParams * pFormatParams
 


Function Documentation

static int allocate_MatchSets pExecuteObject  pEo  )  [static]
 

Definition at line 1949 of file string.c.

References ALLOC, COMMAND_ERROR_MEMORY_LOW, match_InitSets(), and pLastResult.

static void bestfta double  x,
char *  dest
[static]
 

Definition at line 2888 of file string.c.

References bestfta_p(), FMT_xMAX, and FMT_xMIN.

Referenced by format_num().

static void bestfta_p double  x,
char *  dest,
double  minx,
double  maxx
[static]
 

Definition at line 2777 of file string.c.

References buf, E, nfta_eminus, nfta_eplus, sgn(), and strcpy().

Referenced by bestfta(), and expfta().

int check_size pFormatParams  params,
long  len
 

Definition at line 2569 of file string.c.

References _formatParams::buf, _formatParams::bufPtr, _formatParams::bufSize, CHUNK_SIZE, free(), params, and ptr.

Referenced by printChar(), printDouble(), and printInt().

CONVERT2ZCHAR Argument  ,
pszKey 
 

CONVERT2ZCHAR Op1  ,
buffer 
 

ERROR iErrorCode   ) 
 

static void expfta double  x,
char *  dest
[static]
 

Definition at line 2896 of file string.c.

References bestfta_p().

static double fint double  x  )  [static]
 

Definition at line 2698 of file string.c.

Referenced by frac().

static int fmt_cdig char *  fmt  )  [static]
 

Definition at line 3008 of file string.c.

References count.

Referenced by format_num().

static void fmt_nmap int  dir,
char *  dest,
char *  fmt,
char *  src
[static]
 

Definition at line 2908 of file string.c.

Referenced by format_num().

static void fmt_omap char *  dest,
const char *  fmt
[static]
 

Definition at line 2984 of file string.c.

Referenced by format_num().

static int format_num char *  dest,
const char *  fmt_cnst,
double  x
[static]
 

Definition at line 3040 of file string.c.

References bestfta(), fmt, fmt_cdig(), fmt_nmap(), fmt_omap(), free(), fround(), sprintf(), and strcpy().

Referenced by while().

static void fptoa double  x,
char *  dest
[static]
 

Definition at line 2744 of file string.c.

References sprintf().

static double frac double  x  )  [static]
 

Definition at line 2706 of file string.c.

References fint().

Referenced by execute_IsStringInteger().

FREE pszKey   ) 
 

free params.  buf  ) 
 

Referenced by _myf(), AppInit(), AppStart(), check_size(), dynlolib_GetFunctionByName(), ExecuteProgramThread(), fork(), format_num(), FtpProc(), GetExtensionVersion(), HttpExtensionProc(), HttpProc(), if(), lex_free(), main(), mcsub(), my_mrf(), reader_free(), regcomp(), regfree(), and rpm_NewPool().

FREE pvArgs   ) 
 

FREE buffer   ) 
 

FREE Temp   ) 
 

static double fround double  x,
int  dig
[static]
 

Definition at line 2730 of file string.c.

Referenced by format_num().

if iError||  type = =CFT_NODE_BRANCH  ) 
 

if iError  = COMMAND_ERROR_SUCCESS  ) 
 

Definition at line 4099 of file string.c.

if pszSecKey  = NULL  ) 
 

Definition at line 4086 of file string.c.

if memory_IsUndef(vRecord)&&!memory_IsUndef(vFormat)  ) 
 

Definition at line 3880 of file string.c.

References COMMAND_ERROR_MEMORY_LOW, ERROR(), GETLEFTVALUE, GETNPARAM, LONGVALUE(), memcpy(), STRINGVALUE(), and STRLEN().

if params.  buf  ) 
 

if RESULT  = NULL  ) 
 

Definition at line 3427 of file string.c.

References _formatParams::buf, COMMAND_ERROR_MEMORY_LOW, ERROR(), free(), and params.

if cParameters   ) 
 

Definition at line 3241 of file string.c.

References ALLOC, COMMAND_ERROR_MEMORY_LOW, and ERROR().

if plOptionValue   ) 
 

Definition at line 2535 of file string.c.

References LONGVALUE().

if memory_IsUndef(vOptionValue  ) 
 

Definition at line 2495 of file string.c.

References options_Reset(), pEo, and RETURN.

if memcpy((RESULT STRINGVALUE(Op1)[StringLen-1] = = '\n'  ) 
 

Definition at line 2401 of file string.c.

References INITIALIZE.

if iErrorCode   ) 
 

Definition at line 2362 of file string.c.

if cArraySize  ,
pLastResult->  cArraySize
 

Definition at line 2318 of file string.c.

References ALLOC, COMMAND_ERROR_MEMORY_LOW, ERROR(), and FREE.

if memory_IsUndef(Op1)||!match_index(JokerCharacter=*STRINGVALUE(Op1))   ) 
 

Definition at line 2003 of file string.c.

if (CDR(nItem))  ) 
 

Definition at line 1852 of file string.c.

References ASSERTOKE.

if nItem  ) 
 

Definition at line 1846 of file string.c.

if ResultArray  = NULL  ) 
 

Definition at line 1483 of file string.c.

if memory_IsUndef(Delimiter)||STRLEN(Delimiter = = 0  ) 
 

Definition at line 1455 of file string.c.

References STRLEN().

if memory_IsUndef(WholeString)||STRLEN(WholeString = = 0L  ) 
 

Definition at line 1449 of file string.c.

References memory_ReleaseVariable(), pEo, and RETURN.

if lCode  = = 0  ) 
 

Definition at line 1314 of file string.c.

if Op  = NULL  ) 
 

Definition at line 1273 of file string.c.

References RETURN.

if STRLEN(Op = = 0  ) 
 

Definition at line 1188 of file string.c.

References RETURN.

if lStart  ,
 

Definition at line 708 of file string.c.

References memcpy().

if !ReplaceAll &&  lCalculatedRepetitions,
lRepetitions 
 

if memory_IsUndef(Op5  ) 
 

Definition at line 680 of file string.c.

if memory_IsUndef(Op4  ) 
 

Definition at line 664 of file string.c.

if  ) 
 

Definition at line 557 of file string.c.

References NULL, and RETURN.

if memory_IsUndef(Op3  ) 
 

Definition at line 469 of file string.c.

if nItem   ) 
 

Definition at line 464 of file string.c.

References ASSERTOKE.

if memory_IsUndef(Op2  ) 
 

Definition at line 454 of file string.c.

References NULL, and RETURN.

if lStringLength   ) 
 

Definition at line 390 of file string.c.

if memory_IsUndef(Op1  ) 
 

Definition at line 169 of file string.c.

References NULL, RESULT, and RETURN.

int initialize_like pExecuteObject  pEo  ) 
 

Definition at line 1928 of file string.c.

References ALLOC, COMMAND_ERROR_MEMORY_LOW, and pLastResult.

Referenced by collect_dirs().

LONGVALUE RESULT   ) 
 

match_ModifySet pLastResult->  pThisMatchSets,
JokerCharacter  ,
pL  ,
(unsigned char *)  p,
MATCH_ADDC|MATCH_SMUJ|  MATCH_NULS
 

match_ModifySet pLastResult->  pThisMatchSets,
JokerCharacter  ,
pL  ,
(unsigned char *)  p,
MATCH_ADDC|MATCH_SSIJ|  MATCH_NULS
 

Referenced by modu_Init().

memcpy STRINGVALUE(RESULT ,
params.  buf,
params.  bufPtr
 

memcpy STRINGVALUE(RESULT ,
pLastResult->  ParameterArray[index],
pLastResult->  pcbParameterArray[index]
 

options_Set pEo  ,
pszOptionName  ,
lOptionValue 
 

Referenced by modu_Init(), and RaiseError().

int printChar pFormatParams  params  ) 
 

Definition at line 2644 of file string.c.

References _formatParams::buf, _formatParams::bufPtr, check_size(), F_MINUS, F_ZERO, _formatParams::flags, memcpy(), memset(), params, _formatParams::prec, size, _formatParams::vSize, _formatParams::vString, and _formatParams::width.

Referenced by while().

int printDouble pFormatParams  params  ) 
 

Definition at line 2616 of file string.c.

References _formatParams::buf, buf, _formatParams::bufPtr, check_size(), F_BLANK, F_MINUS, F_PLUS, F_SHARP, F_ZERO, _formatParams::flags, flags, len, params, _formatParams::prec, sprintf(), _formatParams::type, _formatParams::vDouble, and _formatParams::width.

Referenced by while().

int printInt pFormatParams  params  ) 
 

Definition at line 2584 of file string.c.

References _formatParams::buf, buf, _formatParams::bufPtr, check_size(), F_BLANK, F_MINUS, F_PLUS, F_SHARP, F_ZERO, _formatParams::flags, flags, len, params, _formatParams::prec, sprintf(), _formatParams::type, _formatParams::vLong, and _formatParams::width.

Referenced by while().

static void rmzeros char *  buf  )  [static]
 

Definition at line 2756 of file string.c.

static int sgn double  x  )  [static]
 

Definition at line 2714 of file string.c.

Referenced by bestfta_p().

sprintf STRINGVALUE(RESULT ,
"%*X"  ,
lLength  ,
lStore 
 

Referenced by _State(), besFUNCTION(), c_flatc(), CreateJunction(), CreateShellLink(), DeleteFromPath(), DeleteFromPathEx(), DeleteRegistryKey(), DeleteShellLink(), ex_IsCommandThis(), execute_Convert2String(), failReport(), format_num(), fptoa(), ftp_report(), FtpProc(), GetRegistryKey(), GuardThread(), httpd_report(), HttpExtensionProc(), HttpProc(), InstallScriptBasic(), isapi_report(), log_thread(), logit(), main(), MyFiles(), MyLinks(), MyMessage(), MyRegs(), noprogress(), printDouble(), printInt(), progress(), PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), PutSBRegString(), regatoi(), regerror(), RemoveScriptBasic(), serconvXML(), SPrintVariable(), while(), and WinMain().

STRLEN RESULT   ) 
 

Referenced by basext_GetArgsF(), besFUNCTION(), CHECK_OPTION(), FileIsSecure(), if(), memory_CopyArray(), return(), serconv(), serconvXML(), SPrintVariable(), STRCMP(), switch(), varcmp(), varhashpjw(), and while().

static int SUBSTRCMP char *  a,
char *  b,
long  length,
int  iCase
[static]
 

Definition at line 68 of file string.c.

Referenced by while().

switch type   ) 
 

Definition at line 4123 of file string.c.

References ERROR(), LONGVALUE(), memcpy(), STRINGVALUE(), and STRLEN().

static END unsigned long TruncatedLength int  lLen,
unsigned long  iArgStr
[static]
 

Definition at line 3452 of file string.c.

Referenced by while().

while  ) 
 

Definition at line 3596 of file string.c.

References GETNPARAM, STRINGVALUE(), STRLEN(), and TruncatedLength().

while size  ,
 

Definition at line 3268 of file string.c.

References ASSERT_PARAMETER_COUNT, _formatParams::buf, _formatParams::bufPtr, CHECK_MEM, CHECK_OPERATION, F_BLANK, F_MINUS, F_PLUS, F_SHARP, F_ZERO, _formatParams::flags, format_num(), FORMAT_SYNTAX_ERROR, LONGVALUE(), memcpy(), params, _formatParams::prec, printChar(), printDouble(), printInt(), STRINGVALUE(), STRLEN(), _formatParams::type, _formatParams::vDouble, _formatParams::vLong, _formatParams::vSize, _formatParams::vString, and _formatParams::width.

while nItem   ) 
 

Definition at line 3237 of file string.c.

while JoinItem   ) 
 

Definition at line 1906 of file string.c.

References FREE, memcpy(), STRINGVALUE(), and STRLEN().

while lStore   ) 
 

Definition at line 1375 of file string.c.

while lLength   ) 
 

Definition at line 1125 of file string.c.

while lStart<=  lLength  ) 
 

Definition at line 712 of file string.c.

References memcpy(), and SUBSTRCMP().

while lStart-1<=lLength lStringLength  ) 
 

Definition at line 481 of file string.c.

References LONGVALUE(), RETURN, and SUBSTRCMP().

while lStringLength   ) 
 

Definition at line 348 of file string.c.

while lStringLength &&  isspace(r[lStringLength-1])  ) 
 

while lStringLength--   ) 
 

Definition at line 307 of file string.c.

while lLen   ) 
 

Definition at line 298 of file string.c.

while lLen &&isspace *  r  ) 
 

while lLen--   ) 
 

Definition at line 214 of file string.c.

while s &&  lLen  ) 
 

Definition at line 129 of file string.c.

static int zsgn double  x  )  [static]
 

Definition at line 2722 of file string.c.


Variable Documentation

error_escape __pad0__
 

Definition at line 3435 of file string.c.

Argument = CONVERT2STRING(Argument)
 

Definition at line 4082 of file string.c.

Argument = EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 

Definition at line 4080 of file string.c.

VARIABLE Argument
 

Definition at line 4077 of file string.c.

Referenced by if(), and switch().

* Array = ResultArray
 

Definition at line 1647 of file string.c.

Array = EVALUATELEFTVALUE_A(PARAMETERNODE)
 

Definition at line 1574 of file string.c.

LEFTVALUE Array
 

Definition at line 1563 of file string.c.

* Array = ResultArray
 

Definition at line 1540 of file string.c.

Array = EVALUATELEFTVALUE_A(PARAMETERNODE)
 

Definition at line 1444 of file string.c.

LEFTVALUE Array
 

Definition at line 1429 of file string.c.

ASSERTOKE
 

Definition at line 4081 of file string.c.

ASSERTOKE
 

Definition at line 3875 of file string.c.

ASSERTOKE
 

Definition at line 3872 of file string.c.

ASSERTOKE
 

Definition at line 3564 of file string.c.

ASSERTOKE
 

Definition at line 3232 of file string.c.

ASSERTOKE
 

Definition at line 2526 of file string.c.

ASSERTOKE
 

Definition at line 2494 of file string.c.

ASSERTOKE
 

Definition at line 2092 of file string.c.

ASSERTOKE
 

Definition at line 2060 of file string.c.

ASSERTOKE
 

Definition at line 2057 of file string.c.

ASSERTOKE
 

Definition at line 2001 of file string.c.

ASSERTOKE
 

Definition at line 1998 of file string.c.

ASSERTOKE
 

Definition at line 1844 of file string.c.

ASSERTOKE
 

Definition at line 1677 of file string.c.

ASSERTOKE
 

Definition at line 1674 of file string.c.

ASSERTOKE
 

Definition at line 1575 of file string.c.

ASSERTOKE
 

Definition at line 1571 of file string.c.

ASSERTOKE
 

Definition at line 1568 of file string.c.

ASSERTOKE
 

Definition at line 1445 of file string.c.

ASSERTOKE
 

Definition at line 1441 of file string.c.

ASSERTOKE
 

Definition at line 1438 of file string.c.

ASSERTOKE
 

Definition at line 1435 of file string.c.

ASSERTOKE
 

Definition at line 1358 of file string.c.

ASSERTOKE
 

Definition at line 1305 of file string.c.

ASSERTOKE
 

Definition at line 1272 of file string.c.

ASSERTOKE
 

Definition at line 1224 of file string.c.

ASSERTOKE
 

Definition at line 1152 of file string.c.

ASSERTOKE
 

Definition at line 1108 of file string.c.

ASSERTOKE
 

Definition at line 1067 of file string.c.

ASSERTOKE
 

Definition at line 1024 of file string.c.

ASSERTOKE
 

Definition at line 1016 of file string.c.

ASSERTOKE
 

Definition at line 960 of file string.c.

ASSERTOKE
 

Definition at line 952 of file string.c.

ASSERTOKE
 

Definition at line 833 of file string.c.

ASSERTOKE
 

Definition at line 825 of file string.c.

ASSERTOKE
 

Definition at line 647 of file string.c.

ASSERTOKE
 

Definition at line 636 of file string.c.

ASSERTOKE
 

Definition at line 625 of file string.c.

ASSERTOKE
 

Definition at line 541 of file string.c.

ASSERTOKE
 

Definition at line 529 of file string.c.

ASSERTOKE
 

Definition at line 453 of file string.c.

ASSERTOKE
 

Definition at line 441 of file string.c.

ASSERTOKE
 

Definition at line 379 of file string.c.

ASSERTOKE
 

Definition at line 286 of file string.c.

ASSERTOKE
 

Definition at line 245 of file string.c.

ASSERTOKE
 

Definition at line 204 of file string.c.

ASSERTOKE
 

Definition at line 168 of file string.c.

ASSERTOKE
 

Definition at line 117 of file string.c.

ASSERTOKE
 

Definition at line 114 of file string.c.

params buf = (char*)malloc(CHUNK_SIZE)
 

Definition at line 3263 of file string.c.

Referenced by besFUNCTION(), bestfta_p(), brushup(), ftp_report(), GuardThread(), httpd_report(), main(), MyFiles(), tty::open_output_mutex(), pathdialog(), printDouble(), printInt(), and SPrintVariable().

char* buffer
 

Definition at line 2520 of file string.c.

params bufPtr = 0
 

Definition at line 3265 of file string.c.

params bufSize = CHUNK_SIZE
 

Definition at line 3264 of file string.c.

cbResult = 0
 

Definition at line 3595 of file string.c.

unsigned long cbResult
 

Definition at line 3548 of file string.c.

char cChar
 

Definition at line 3554 of file string.c.

char cFill
 

Definition at line 1099 of file string.c.

cParameters = 0
 

Definition at line 3568 of file string.c.

unsigned long cParameters
 

Definition at line 3548 of file string.c.

cParameters = 0
 

Definition at line 3236 of file string.c.

unsigned long cParameters
 

FORMAT =section string =title FORMAT() =display FORMAT()

The function format accepts variable number of arguments. The first argument is a format string and the rest of the arguments are used to create the result string according to the format string. This way the function T<format> is like the C function T<sprintf>.

The format string can contain normal characters and control substrings.

The control substring have the form T<%[flags][width][.precision]type>. It follows the general T<sprintf> format except that type prefixes are not required or allowed and type can only be "dioxXueEfgGsc". The T<*> for width and precision is supported.

An alternate format BASIC-like for numbers has the form T<~format~> where T<format> can be:

# Digit or space

0 Digit or zero

^ Stores a number in exponential format. Unlike QB's USING format this is a place-holder like the #.

. The position of the decimal point.

, Separator.

  • Stores minus if the number is negative.

+ Stores the sign of the number.

Acknowledgement: the function T<format> was implemented by Paulo Soares <psoares@consiste.pt>

Definition at line 3217 of file string.c.

double dConf
 

Definition at line 4072 of file string.c.

Delimiter = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1676 of file string.c.

VARIABLE Delimiter
 

Definition at line 1664 of file string.c.

Delimiter = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1570 of file string.c.

END VARIABLE Delimiter
 

Definition at line 1562 of file string.c.

Delimiter = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1437 of file string.c.

END VARIABLE Delimiter
 

Definition at line 1428 of file string.c.

double dParam
 

Definition at line 3555 of file string.c.

int fLen
 

Definition at line 3868 of file string.c.

int fLen
 

Definition at line 3553 of file string.c.

char fmt[128]
 

Definition at line 3224 of file string.c.

Referenced by format_num().

int i
 

Definition at line 4078 of file string.c.

unsigned long i
 

Definition at line 3867 of file string.c.

unsigned long i
 

Definition at line 1834 of file string.c.

unsigned long i
 

Definition at line 1666 of file string.c.

unsigned long i
 

Definition at line 1564 of file string.c.

unsigned long i
 

Definition at line 1430 of file string.c.

iArg = 0
 

Definition at line 3694 of file string.c.

iArg = 0
 

Definition at line 3594 of file string.c.

iArg = 0
 

Definition at line 3580 of file string.c.

unsigned long iArg
 

Definition at line 3549 of file string.c.

iArg = 0
 

Definition at line 3262 of file string.c.

iArg = 0
 

Definition at line 3251 of file string.c.

unsigned long iArg
 

Definition at line 3218 of file string.c.

unsigned long iArgStr
 

Definition at line 3549 of file string.c.

int iCase = OPTION("compare")&1
 

Definition at line 615 of file string.c.

int iCase = OPTION("compare")&1
 

Definition at line 519 of file string.c.

int iCase = OPTION("compare")&1
 

Definition at line 431 of file string.c.

Referenced by execute_LeftValueSarray().

unsigned long iCount
 

Definition at line 1430 of file string.c.

iError = cft_GetEx(pEo->pConfig,pszKey,NULL,&pszConf,&lConf,&dConf,&type)
 

Definition at line 4117 of file string.c.

iError = cft_GetEx(pEo->pConfig,pszSecKey,NULL,&pszConf,&lConf,&dConf,&type)
 

Definition at line 4096 of file string.c.

int iError
 

Definition at line 4074 of file string.c.

iError
 

Initial value:

 match_match(p,
                       pL,
                       s,
                       sL,
                       pLastResult->ParameterArray,
                       pLastResult->pcbParameterArray,
                       pLastResult->pszBuffer,
                       pLastResult->cArraySize,
                       pLastResult->cbBufferSize,
                       !(OPTION("compare")&1),
                       pLastResult->pThisMatchSets,
                       &(pLastResult->iMatches))

Definition at line 2349 of file string.c.

int iFirstLoop
 

Definition at line 1829 of file string.c.

index
 

Definition at line 2460 of file string.c.

INITIALIZE
 

Definition at line 2087 of file string.c.

INITIALIZE
 

Definition at line 2051 of file string.c.

INITIALIZE
 

Definition at line 1993 of file string.c.

unsigned long iRec
 

Definition at line 3867 of file string.c.

iResult = 0
 

Definition at line 3695 of file string.c.

unsigned long iResult
 

Definition at line 3549 of file string.c.

unsigned long iStart
 

Definition at line 1666 of file string.c.

unsigned long iStart
 

Definition at line 1564 of file string.c.

unsigned long iStart
 

Definition at line 1430 of file string.c.

unsigned long iStr
 

Definition at line 3867 of file string.c.

iStr = 0
 

Definition at line 3693 of file string.c.

iStr = 0
 

Definition at line 3593 of file string.c.

unsigned long iStr
 

Definition at line 3549 of file string.c.

int iThisChar
 

Definition at line 3868 of file string.c.

int j
 

Definition at line 4078 of file string.c.

Referenced by __pprint(), _ex_pprint(), _GetParam(), _ScriptName(), brushupinline(), build_Build_r(), build_SaveCCode(), c_flatc(), cgi_ReadHeader(), cgi_ShiftBuffer(), close_directory_list(), comm_List(), comm_WeAreAt(), Decode(), DeleteFromPath(), Encode(), ex_CleanNamePath(), GetSourceLineNumber(), HandleHttpHit(), httpd(), main(), modu_LoadModule(), MyExecBefore(), pow10(), sort_dirs(), and uudecode().

struct _JoinItem* JoinFree
 

JoinItem = NULL
 

Definition at line 1836 of file string.c.

struct _JoinItem * JoinItem
 

char JokerCharacter
 

Definition at line 2085 of file string.c.

char JokerCharacter
 

Definition at line 2047 of file string.c.

char JokerCharacter
 

Definition at line 1989 of file string.c.

Referenced by match_index().

long l_start
 

Definition at line 613 of file string.c.

long lCalculatedRepetitions
 

Definition at line 611 of file string.c.

lCharCode = (unsigned char)*(STRINGVALUE(Op))
 

Definition at line 1193 of file string.c.

lCharCode = 256
 

Definition at line 1153 of file string.c.

lCharCode = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(PARAMETERLIST))))
 

Definition at line 1151 of file string.c.

END long lCharCode
 

CHR =section string =display CHR() =title CHR(code) Return a one character string containing a character of ASCII code T.

Definition at line 1145 of file string.c.

unsigned long lChunkCounter
 

Definition at line 1564 of file string.c.

unsigned long lChunkCounter
 

Definition at line 1430 of file string.c.

lCode = LONGVALUE(CONVERT2LONG(Op))
 

Definition at line 1364 of file string.c.

END unsigned long lCode
 

OCT =section string =title OCT(n) =display OCT()

Take the argument as a long value and convert it to a string that represents the value in octal form.

Definition at line 1350 of file string.c.

lCode = LONGVALUE(CONVERT2LONG(Op))
 

Definition at line 1311 of file string.c.

END unsigned long lCode
 

HEX =section string =display HEX() =title HEX(n)

Take the argument as a long value and convert it to a string that represents the value in hexadecimal form. The hexadecimal form will contain upper case alpha character if there is any alpha character in the hexadecimal representation of the number.

Definition at line 1298 of file string.c.

long lConf
 

Definition at line 4071 of file string.c.

LEFTVALUE LeftValue
 

Definition at line 3866 of file string.c.

LEFTVALUE LeftValue
 

Definition at line 1665 of file string.c.

lFinalStringLength = Op2 ? STRLEN(Op2) : 0
 

Definition at line 120 of file string.c.

lFinalStringLength = Op1 ? STRLEN(Op1) : 0
 

Definition at line 119 of file string.c.

long lFinalStringLength
 

Definition at line 103 of file string.c.

unsigned long lItemNumber
 

Definition at line 1834 of file string.c.

unsigned long lLen
 

Definition at line 3867 of file string.c.

unsigned long lLen
 

Definition at line 3550 of file string.c.

lLen
 

Definition at line 388 of file string.c.

lLen = STRLEN(Op1)
 

Definition at line 386 of file string.c.

unsigned long lLen
 

Definition at line 371 of file string.c.

lLen
 

Definition at line 295 of file string.c.

lLen = STRLEN(Op1)
 

Definition at line 293 of file string.c.

unsigned long lLen
 

Definition at line 278 of file string.c.

lLen = STRLEN(RESULT)
 

Definition at line 253 of file string.c.

unsigned long lLen
 

Definition at line 237 of file string.c.

lLen = STRLEN(RESULT)
 

Definition at line 212 of file string.c.

unsigned long lLen
 

Definition at line 196 of file string.c.

lLen = Op2 ? STRLEN(Op2) : 0
 

Definition at line 134 of file string.c.

lLen = Op1 ? STRLEN(Op1) : 0
 

Definition at line 128 of file string.c.

long lLen
 

Definition at line 103 of file string.c.

Referenced by build_StringIndex(), and reader_RelateFile().

lLength = 0
 

Definition at line 1366 of file string.c.

unsigned long lLength
 

Definition at line 1351 of file string.c.

lLength = 0
 

Definition at line 1313 of file string.c.

unsigned long lLength
 

Definition at line 1299 of file string.c.

lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 

Definition at line 1107 of file string.c.

long lLength
 

Definition at line 1098 of file string.c.

lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 

Definition at line 1066 of file string.c.

long lLength
 

Definition at line 1058 of file string.c.

lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 

Definition at line 1023 of file string.c.

long lLength
 

Definition at line 1007 of file string.c.

lLength = LONGVALUE(CONVERT2LONG(EVALUATEEXPRESSION(CAR(nItem))))
 

Definition at line 959 of file string.c.

long lLength
 

Definition at line 943 of file string.c.

else lLength = -1
 

Definition at line 865 of file string.c.

long lLength
 

Definition at line 813 of file string.c.

lLength = STRLEN(Op1)
 

Definition at line 632 of file string.c.

long lLength
 

Definition at line 613 of file string.c.

lLength = STRLEN(Op1)
 

Definition at line 536 of file string.c.

long lLength
 

Definition at line 517 of file string.c.

lLength = STRLEN(Op1)
 

Definition at line 448 of file string.c.

long lLength
 

Definition at line 429 of file string.c.

unsigned long lLenS
 

Definition at line 3867 of file string.c.

unsigned long lLenS
 

Definition at line 3550 of file string.c.

unsigned long lMag
 

Definition at line 3867 of file string.c.

lOptionValue = LONGVALUE(vOptionValue)
 

Definition at line 2499 of file string.c.

long lOptionValue
 

Definition at line 2488 of file string.c.

long lParam
 

Definition at line 3551 of file string.c.

long lRepetitions
 

Definition at line 610 of file string.c.

lReplaceLength = STRLEN(Op3)
 

Definition at line 653 of file string.c.

long lReplaceLength
 

Definition at line 613 of file string.c.

lResult = STRLEN(Op1) + lCalculatedRepetitions * (lReplaceLength-lSearchLength)
 

Definition at line 698 of file string.c.

long lResult
 

Definition at line 613 of file string.c.

unsigned long lResultLength
 

Definition at line 1834 of file string.c.

lSearchLength = STRLEN(Op2)
 

Definition at line 643 of file string.c.

long lSearchLength
 

Definition at line 613 of file string.c.

lStart
 

Definition at line 867 of file string.c.

long lStart
 

Definition at line 813 of file string.c.

lStart = l_start
 

Definition at line 705 of file string.c.

long lStart
 

Definition at line 613 of file string.c.

long lStart
 

Definition at line 517 of file string.c.

long lStart
 

Definition at line 429 of file string.c.

Referenced by comm_GetCommand().

lStore = lCode
 

Definition at line 1365 of file string.c.

unsigned long lStore
 

Definition at line 1351 of file string.c.

lStore = lCode
 

Definition at line 1312 of file string.c.

unsigned long lStore
 

Definition at line 1299 of file string.c.

lStringLength = STRLEN(Op1)
 

Definition at line 1232 of file string.c.

long lStringLength
 

Definition at line 1215 of file string.c.

long lStringLength
 

Definition at line 1007 of file string.c.

long lStringLength
 

Definition at line 943 of file string.c.

lStringLength = STRLEN(Op1)
 

Definition at line 869 of file string.c.

long lStringLength
 

Definition at line 813 of file string.c.

lStringLength = STRLEN(Op2)
 

Definition at line 548 of file string.c.

long lStringLength
 

Definition at line 517 of file string.c.

lStringLength = STRLEN(Op2)
 

Definition at line 460 of file string.c.

long lStringLength
 

Definition at line 429 of file string.c.

lStringLength
 

Definition at line 388 of file string.c.

lStringLength = STRLEN(Op1)
 

Definition at line 387 of file string.c.

unsigned long lStringLength
 

Definition at line 371 of file string.c.

lStringLength = STRLEN(Op1)
 

Definition at line 342 of file string.c.

lStringLength = 0
 

Definition at line 297 of file string.c.

unsigned long lStringLength
 

Definition at line 278 of file string.c.

NEXTPARAMETER
 

Definition at line 3876 of file string.c.

NEXTPARAMETER
 

Definition at line 3873 of file string.c.

NEXTPARAMETER
 

Definition at line 2492 of file string.c.

NEXTPARAMETER
 

Definition at line 2058 of file string.c.

NEXTPARAMETER
 

Definition at line 1999 of file string.c.

NEXTPARAMETER
 

Definition at line 1678 of file string.c.

NEXTPARAMETER
 

Definition at line 1675 of file string.c.

NEXTPARAMETER
 

Definition at line 1572 of file string.c.

NEXTPARAMETER
 

Definition at line 1569 of file string.c.

NEXTPARAMETER
 

Definition at line 1442 of file string.c.

NEXTPARAMETER
 

Definition at line 1439 of file string.c.

NEXTPARAMETER
 

Definition at line 1436 of file string.c.

double nfta_eminus[] [static]
 

Initial value:

{ 
    1e-8,   1e-16,  1e-24,  1e-32, 1e-40,   1e-48,  1e-56,  1e-64,  
    1e-72,  1e-80,  1e-88,  1e-96, 1e-104,  1e-112, 1e-120, 1e-128, 
    1e-136, 1e-144, 1e-152, 1e-160, 1e-168, 1e-176, 1e-184, 1e-192, 
    1e-200, 1e-208, 1e-216, 1e-224, 1e-232, 1e-240, 1e-248, 1e-256, 
    1e-264, 1e-272, 1e-280, 1e-288, 1e-296, 1e-304                                        
}

Definition at line 46 of file string.c.

Referenced by bestfta_p().

double nfta_eplus[] [static]
 

Initial value:

{ 
    1e+8,   1e+16,  1e+24,  1e+32,  1e+40,  1e+48,  1e+56,  1e+64,      
    1e+72,  1e+80,  1e+88,  1e+96,  1e+104, 1e+112, 1e+120, 1e+128,     
    1e+136, 1e+144, 1e+152, 1e+160, 1e+168, 1e+176, 1e+184, 1e+192,     
    1e+200, 1e+208, 1e+216, 1e+224, 1e+232, 1e+240, 1e+248, 1e+256,     
    1e+264, 1e+272, 1e+280, 1e+288, 1e+296, 1e+304                  
}

Definition at line 37 of file string.c.

Referenced by bestfta_p().

nItem = PARAMETERNODE
 

Definition at line 3878 of file string.c.

NODE nItem
 

UNPACK =section string =display UNPACK =title UNPACK string BY format TO v1,v2,...,vn

Unpack the binary string T<string> using the format string into the variables. The format string should have the same format as the format string the in the function R<PACK>.

Definition at line 3864 of file string.c.

nItem = CDR(PARAMETERLIST)
 

Definition at line 3579 of file string.c.

nItem = CDR(nItem)
 

Definition at line 3567 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 3562 of file string.c.

NODE nItem
 

PACK =section string =display PACK() =title pack("format",v1,v2,...,vn)

Pack list of arguments into a binary string.

The format strings can contain the packing control literals. Each of these characters optionally take the next argument and convert to the specific binary string format. The result is the concatenated sum of these strings.

Some control characters do not take argument, but result a constant string by their own.

=itemize

=item T<SZ> the argument is stored as zero terminated string. If the argument already contains zchar that is taken as termnator and the rest of the string is ignored.

=item T<S1> the argument is stored as a string. One byte length and maximum 255 byte strings. If the argument longer than 255 bytes only the first 255 bytes are used, and the rest is ignored.

=item T<S2> same as T<S1> but with two bytes for the length.

=item T<S3> same as T<S1> but with three bytes for the length.

=item T<S4> same as T<S1> but with four bytes for the length.

=item T<S5..8> the same as T<S1> but with 5..8 bytes for the length.

=item T<Zn> one or more zero characters, does not take argument. T<n> can be 1,2,3 ... positive numbers

=item T<In> integer number stored on n bytes. Low order byte first. If the number does not fit into n bytes the higher bytes are chopped. If the number is negative the high overflow bytes are filled with FF.

=item T<C> character (same as T<I1>)

=item T<Un> same as T<In> but for unsigned numbers.

=item T<An> store the argument as string on n bytes. If the argument is longer than n bytes only the first n bytes are stored. If the argument is shorter than n bytes the higher bytes are filled with space.

=item T<R> a real number. =noitemize

See also R<UNPACK>

Definition at line 3546 of file string.c.

nItem = CDR(PARAMETERLIST)
 

Definition at line 3250 of file string.c.

nItem = CDR(nItem)
 

Definition at line 3235 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 3230 of file string.c.

NODE nItem
 

Definition at line 3223 of file string.c.

nItem = CDR(nItem)
 

Definition at line 1845 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 1842 of file string.c.

nItem = PARAMETERNODE
 

Definition at line 1680 of file string.c.

END NODE nItem
 

SPLIT =section string =title SPLIT string BY string TO var_1,var_2,var_3,...,var_n

Takes the string and splits into the variables using the second string as delimiter.

Definition at line 1663 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 1222 of file string.c.

END NODE nItem
 

STRREVERTE =section string =display STRREVERSE() =title STRREVERSE(string) Return the reversed string (aka. all the characters in the string in reverse order).

Definition at line 1213 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 1106 of file string.c.

END NODE nItem
 

STRING =section string =title STRING(n,code) =display STRING()

Create a string of length T<n> containing characters T. If T is a string then the first character of the string is used to fill the result. Otherwise T is converted to long and the ASCII code is used.

Definition at line 1096 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 1065 of file string.c.

END NODE nItem
 

SPACE =section string =display SPACE() =title SPACE(n) Return a string of length T<n> containing spaces.

Definition at line 1057 of file string.c.

nItem = CDR(nItem)
 

Definition at line 1022 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 1014 of file string.c.

END NODE nItem
 

RIGHT =section string =display RIGHT() =title RIGHT(string,len)

Creates the right of a string. The first argument is the string. The second argument is the number of characters that should be put into the result. If this value is larger than the number of characters in the string then all the string is returned.

See also R<MID>, R<LEFT>.

=details T<RIGHT(x,y)> cuts out a substring of T<y> characters from the right of the string T<x>. If the first argument is not defined the result is also T<undef>. Otherwise the first argument is converted to string and the second argument is converted to integer value.

If the second argument is not defined or has negative value it is treated as numeric zero and as such the result string will be empty string.

For compatibility reasons you can append a dollar (T<$>) sign to the end of the function identifier.

Definition at line 1005 of file string.c.

nItem = CDR(nItem)
 

Definition at line 958 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 950 of file string.c.

END NODE nItem
 

LEFT =section string =display LEFT() =title LEFT(string,len)

Creates the left of a string. The first argument is the string. The second argument is the number of characters that should be put into the result. If this value is larger than the number of characters in the string then all the string is returned.

See also R<MID>, R<RIGHT>

=details T<left(x,y)> cuts out a substring of T<y> characters from the left of the string T<x>. If the first argument is not defined the result is also T<undef>. Otherwise the first argument is converted to string and the second ar-gument is converted to integer value.

If the second argument is not defined or has negative value it is treated as numeric zero and as such the result string will be empty string.

For compatibility reasons you can append a dollar (T<$>) sign to the end of the function identifier.

Example

=verbatim a$ = _ "superqualifragilisticexpialidosys" print "*",left(a$,undef),"*" print "*",left(a$,7),"*" print "*",left(a$,-6),"*" print "*",left(a$,0),"*" print left(undef,"66") =noverbatim

will print

=verbatim

superqu*

undef =noverbatim

Definition at line 941 of file string.c.

nItem = CDR(nItem)
 

Definition at line 845 of file string.c.

nItem = CDR(nItem)
 

Definition at line 831 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 820 of file string.c.

END NODE nItem
 

MID =section string =display MID() =title MID(string,start [ ,len ])

Return a subpart of the string. The first argument is the string, the second argument is the start position. The third argument is the length of the sub-part in terms of characters. If this argument is missing then the subpart lasts to the last character of the argument T<string>.

See also R<LEFT>, R<RIGHT>.

=details T<mid(x,y,[z])> cuts out a sub-string from the string T<x>. If the first argument of the function is undefined the result is T<undef>. Otherwise the first argument is converted to string and the second and third arguments are converted to numeric value. The third argument is optional.

The second argument specifies the start position of the resulting substring in the original string x; and the last argument specifies the number of characters to take from the original string T<x>. If the third argument is missing the substring lasts from the start position to the end of the string. If the second argu-ment is not defined the start of the substring is at the start of the original string. In other words if the second argument is missing it is the same as value 1. If the second argument is zero or negative it will specify the start position counting the characters from the end of the string.

If the staring position T<y> points beyond the end of the string the result is empty string. If the length of the substring is larger than the number of characters between the starting position and end of the original string then the result will be the substring between the start position and the end of the original string.

If the length of the substring is negative the characters before the starting position are taken. No more than the available characters can be taken in this case either. In other words if the length is negative and is larger in absolute value than the starting position the resulting sub-string is the character between the position specified by the second argument and the start of the string.

Note that the order of the characters is never changed even if some position or length parameters are negative.

For compatibility reasons you can append a dollar (T<$>) sign to the end of the function identifier.

Example: =verbatim a$ = "superqualifragilisticexpialidosys" print mid(a$,undef) print mid(a$,1,5) print mid(a$,undef,6) print mid(a$,6,5) print mid(a$,"-3") print "*",mid(a$,0),"*" print mid(undef,"66") print mid(a$,6,-3) print mid(a$,6,3) print mid(a$,-4,-3) print mid(a$,-4,3) =noverbatim

will print

=verbatim superqualifragilisticexpialidosys super superq quali sys

undef erq qua ido osy =noverbatim

Definition at line 811 of file string.c.

nItem = CDR(nItem)
 

Definition at line 654 of file string.c.

nItem = CDR(nItem)
 

Definition at line 642 of file string.c.

nItem = CDR(nItem)
 

Definition at line 631 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 621 of file string.c.

END NODE nItem
 

REPLACE =section string =title REPLACE(base_string,search_string,replace_string [,number_of_replaces] [,position]) =display REPLACE()

This function replaces one or more occurrences of a sub-string in a string. T<REPLACE(a,b,c)> searches the string T seeking for occurrences of sub-string T and replaces each of them with the string T<c>.

The fourth and fifth arguments are optional. The fourth argument specifies the number of replaces to be performed. If this is missing or is T<undef> then all occurrences of string T will be replaced. The fifth argument may specify the start position of the operation. For example the function call

=verbatim REPLACE("alabama mama", "a","x",3,5) =noverbatim

will replace only three occurrences of string T<"a"> starting at position 5. The result is T<"alabxmx mxma">.

Definition at line 608 of file string.c.

nItem = CDR(nItem)
 

Definition at line 547 of file string.c.

nItem = CDR(nItem)
 

Definition at line 535 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 525 of file string.c.

END NODE nItem
 

INSTRREV =section string =display INSTRREV() =title INSTRREV(base_string,search_string [ ,position ] ) This function can be used to search a sub-string in a string in reverse order starting from the end of the string. The first argument is the string we are searching in. The second argument is the string that we actually want to find in the first argument. The third optional argument is the position where the search is to be started. If this argument is missing the search starts with the last character position of the string. The function returns the position where the sub-string can be found in the first string. If the searched sub-string is not found in the string then the return value is undef.

See R<INSTR>

Definition at line 515 of file string.c.

nItem = CDR(nItem)
 

Definition at line 459 of file string.c.

nItem = CDR(nItem)
 

Definition at line 447 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 437 of file string.c.

END NODE nItem
 

INSTR =section string =title INSTR(base_string,search_string [ ,position ] ) =display INSTR() This function can be used to search a sub-string in a string. The first argument is the string we are searching in. The second argument is the string that we actually want to find in the first argument. The third optional argument is the position where the search is to be started. If this argu-ment is missing the search starts with the first character position of the string. The function returns the position where the sub-string can be found in the first string. If the searched sub-string is not found in the string then the return value is undef.

See R<INSTRREV>

Definition at line 427 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 377 of file string.c.

END NODE nItem
 

TRIM =section string =title TRIM() =display TRIM() Remove the space from both ends of the string.

Definition at line 368 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 284 of file string.c.

END NODE nItem
 

LTRIM =section string =title LTRIM() =display LTRIM() Remove the space from the left of the string.

Definition at line 275 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 243 of file string.c.

END NODE nItem
 

LCASE =title LCASE() =display LCASE() =section string Lowercase a string.

Definition at line 234 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 202 of file string.c.

END NODE nItem
 

UCASE =title UCASE() =display UCASE() =section string Uppercase a string.

Definition at line 193 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 166 of file string.c.

END NODE nItem
 

LEN =section string =display LEN() =title LEN()

This function interprets its argument as a string and returns the length of the string. In ScriptBasic strings can hold any value thus the length of the string is the number of characters contained in the string containing any binary characters, even binary zero.

If the argument is not a string it is converted to string automatically and the length of the converted string is returned. The only exception is T<undef> for which the result is also T<undef>.

Definition at line 159 of file string.c.

nItem = CDR(nItem)
 

Definition at line 115 of file string.c.

nItem = PARAMETERLIST
 

Definition at line 110 of file string.c.

NODE nItem
 

CONCATENATE =section string =display & =title Concatenate operator &amp;

This operator concatenates two strings. The resulting string will contain the characters of the string standing on the left side of the operator followed by the characters of the string standing on the right hand side of the operator. The ScriptBasic interpreter automatically allocates the resulting string.

Definition at line 101 of file string.c.

END NOTIMPLEMENTED
 

MKL =section planned =display MKL()

This is a planned function.

Converts the long-integer number "n" into an 4-byte string so it can later be retrieved from a random-access file as a numeric value.

Definition at line 4286 of file string.c.

END NOTIMPLEMENTED
 

MKS =section planned =display MKS()

This is a planned function.

Converts the single-precision number "n" into an 4-byte string so it can later be retrieved from a random-access file as a numeric value.

Definition at line 4270 of file string.c.

END NOTIMPLEMENTED
 

MKI =section planned =display MKI()

This is a planned function to convert the argument integer number to an 2 byte string.

Converts the integer number "n" into an 2-byte string so it can later be retrieved from a random-access file as a numeric value.

Definition at line 4254 of file string.c.

END NOTIMPLEMENTED
 

MKD =section planned =display MKD()

This is a planned function to convert the argument real number to an 8 byte string.

Converts the double-precision number "n" into an 8-byte string so it can later be retrieved from a random-access file as a numeric value.

Definition at line 4238 of file string.c.

END NOTIMPLEMENTED
 

CVS =section planned =display CVS()

This is a planned function to convert the argument string into an integer.

Converts a passed in string "str$" to a single precision number. The passed string must be four (4) bytes or longer. If less than 4 bytes long, an error is generated. If more than 4 bytes long, only the first 4 bytes are used.

Definition at line 4221 of file string.c.

END NOTIMPLEMENTED
 

CVL =section planned =display CVL()

This is a planned function to convert the argument string into an integer.

Converts a passed in string "str$" to a long-integer number. The passed string must be four (4) bytes or longer. If less than 4 bytes long, an error is generated. If more than 4 bytes long, only the first 4 bytes are used.

Definition at line 4205 of file string.c.

END NOTIMPLEMENTED
 

CVI =section planned =display CVI()

This is a planned function to convert the argument string into an integer.

Converts a passed in string "str$" to an integer number. The passed string must be two (2) bytes or longer. If less than 2 bytes long, an error is generated. If more than 2 bytes long, only the first 2 bytes are used.

Definition at line 4189 of file string.c.

END NOTIMPLEMENTED
 

CVD =section planned =display CVD()

This is a planned function to convert the argument string into a real number.

Converts a passed in string "str$" to a double-precision number. The passed string must be eight (8) bytes or longer. If less than 8 bytes long, an error is generated. If more than 8 bytes long, only the first 8 bytes are used.

Definition at line 4173 of file string.c.

END NOTIMPLEMENTED
 

BIN =section planned =display BIN()

This is a planned function to convert the argument number to binary format. (aka. format as a binary number containing only 0 and 1 characters and return this string)

Definition at line 4157 of file string.c.

Op = EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 

Definition at line 1357 of file string.c.

VARIABLE Op
 

Definition at line 1353 of file string.c.

Op = EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 

Definition at line 1304 of file string.c.

VARIABLE Op
 

Definition at line 1300 of file string.c.

Op = _EVALUATEEXPRESSION(CAR(PARAMETERLIST))
 

Definition at line 1271 of file string.c.

END VARIABLE Op
 

STR =section string =title STR(n) =display STR() Converts a number to string. This function is rarely needed, because conversion is done automatically. =details Converts a number to string. This function is rarely needed, because conversion is done automatically. However you may need

=verbatim STRING(13,STR(a)) =noverbatim

to be sure that the value T is interpreted as string value.

Definition at line 1266 of file string.c.

Op = CONVERT2STRING(Op)
 

Definition at line 1187 of file string.c.

VARIABLE Op
 

Definition at line 1097 of file string.c.

Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(PARAMETERLIST)))
 

Definition at line 2525 of file string.c.

END VARIABLE Op1
 

OPTIONF =section misc =display OPTION() =title OPTION("symbol")

Retrieve the actual value of an option symbol as an integer or T<undef> if the option was not set. Unlike in the command R<OPTION> the argument of this function should be double quoted.

Definition at line 2518 of file string.c.

Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 2091 of file string.c.

END VARIABLE Op1
 

Definition at line 2083 of file string.c.

Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 2056 of file string.c.

END VARIABLE Op1
 

SETWILD =title SET WILD "c" TO "abcdefgh..." =display SET [NO] WILD =section string pattern

Set a wild character to match certain characters when using the R<LIKE> operator. The wild character T<"c"> can be one of the following characters

=verbatim # $ @ ? & % ! + / | < > =noverbatim

The string after the keyword T<TO> should contain all the characters that the wild card character should match. To have the character to match only itself to be a normal character say =verbatim SET NO WILD "c" =noverbatim

See also R<SETJOKER>, R<LIKE> (details), R<JOKER>

Definition at line 2045 of file string.c.

Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1997 of file string.c.

VARIABLE Op1
 

SETJOKER =title SET JOKER "c" TO "abcdefgh..." =display SET [NO] JOKER =section string pattern

Set a joker character to match certain characters when using the R<LIKE> operator. The joker character T<"c"> can be one of the following characters

=verbatim # $ @ ? & % ! + / | < > =noverbatim

The string after the keyword T<TO> should contain all the characters that the joker character should match. To have the character to match only itself to be a normal character say =verbatim SET NO JOKER "c" =noverbatim

See also R<SETWILD>, R<LIKE> (details), R<JOKER>

Definition at line 1987 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 1229 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 1223 of file string.c.

VARIABLE Op1
 

Definition at line 1214 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 1021 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 1015 of file string.c.

VARIABLE Op1
 

Definition at line 1006 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 957 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 951 of file string.c.

VARIABLE Op1
 

Definition at line 942 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 830 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 824 of file string.c.

VARIABLE Op1
 

Definition at line 812 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 630 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 624 of file string.c.

VARIABLE Op1
 

Definition at line 609 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 534 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 528 of file string.c.

VARIABLE Op1
 

Definition at line 516 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 446 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 440 of file string.c.

VARIABLE Op1
 

Definition at line 428 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 384 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 378 of file string.c.

VARIABLE Op1
 

Definition at line 369 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 340 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 291 of file string.c.

Op1 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 285 of file string.c.

VARIABLE Op1
 

Definition at line 276 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 250 of file string.c.

Op1 = EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 244 of file string.c.

VARIABLE Op1
 

Definition at line 235 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 209 of file string.c.

Op1 = EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 203 of file string.c.

VARIABLE Op1
 

Definition at line 194 of file string.c.

Op1 = CONVERT2STRING(Op1)
 

Definition at line 173 of file string.c.

Op1 = EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 167 of file string.c.

VARIABLE Op1
 

Definition at line 160 of file string.c.

Op1 = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 

Definition at line 113 of file string.c.

VARIABLE Op1
 

Definition at line 102 of file string.c.

Op2 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 2059 of file string.c.

END VARIABLE Op2
 

Definition at line 2045 of file string.c.

Op2 = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 2000 of file string.c.

VARIABLE Op2
 

Definition at line 1987 of file string.c.

Op2 = EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 832 of file string.c.

VARIABLE Op2
 

Definition at line 812 of file string.c.

Op2 = CONVERT2STRING(Op2)
 

Definition at line 641 of file string.c.

Op2 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 635 of file string.c.

VARIABLE Op2
 

Definition at line 609 of file string.c.

Op2 = CONVERT2STRING(Op2)
 

Definition at line 546 of file string.c.

Op2 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 540 of file string.c.

VARIABLE Op2
 

Definition at line 516 of file string.c.

Op2 = CONVERT2STRING(Op2)
 

Definition at line 458 of file string.c.

Op2 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 452 of file string.c.

VARIABLE Op2
 

Definition at line 428 of file string.c.

Op2 = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 

Definition at line 116 of file string.c.

VARIABLE Op2
 

Definition at line 102 of file string.c.

VARIABLE Op3
 

Definition at line 812 of file string.c.

Op3 = CONVERT2STRING(Op3)
 

Definition at line 652 of file string.c.

Op3 = _EVALUATEEXPRESSION(CAR(nItem))
 

Definition at line 646 of file string.c.

VARIABLE Op3
 

Definition at line 609 of file string.c.

Op3 = NULL
 

Definition at line 551 of file string.c.

VARIABLE Op3
 

Definition at line 516 of file string.c.

Op3 = NULL
 

Definition at line 463 of file string.c.

VARIABLE Op3
 

Definition at line 428 of file string.c.

Op4 = NULL
 

Definition at line 657 of file string.c.

VARIABLE Op4
 

Definition at line 609 of file string.c.

Op5 = NULL
 

Definition at line 673 of file string.c.

VARIABLE Op5
 

Definition at line 609 of file string.c.

char * p
 

Definition at line 3219 of file string.c.

char* p
 

Definition at line 2048 of file string.c.

char* p
 

Definition at line 1990 of file string.c.

Referenced by __InsertImage(), __RemoveImage(), _ex_PopLabel(), _ex_printVAR(), _ex_PushLabel(), _new_eNODE(), _new_eNODE_l(), _new_SymbolLABEL(), _new_SymbolUF(), _new_SymbolVAR(), _NewLexeme(), alloc_Merge(), AllocFileName(), AllocUserFunction(), build_CreateFTable(), build_CreateVTable(), build_LookupFunctionOrVariable(), c_cons(), c_newnode(), c_StrDup(), cgi_FileLength(), cgi_FILEp(), cgi_GetParam(), cgi_OriginalFileName(), cgi_PartHeader(), cgi_PostParam(), ex_CleanNameSpaceStack(), ex_Command_r(), ex_IsBFun(), ex_IsBinop(), ex_IsUnop(), execute_CopyCommandTable(), expression_PopNameSpace(), expression_PushNameSpace(), F_LibraryLoaded(), FinishSegmentCallBack(), hashpjw(), if(), ipreproc_Process(), ipreproc_PurgePreprocessorMemory(), lex_Finish(), lex_HandleContinuationLines(), lex_RemoveComments(), lex_RemoveSkipSymbols(), lex_SymbolicName(), lnw(), mcfind(), memory_NewArray(), memory_NewMortal(), memory_ReleaseMortals(), options_Get(), options_GetR(), options_Reset(), options_Set(), PopStackItem(), prompt(), PushStackItem(), reader_DumpLines(), reader_LoadPreprocessors(), reader_ProcessIncludeFiles(), reader_ReadLines(), regatoi(), regcomp(), release_list(), RemoveNil(), scriba_new(), scriba_NewSbArgs(), scriba_NewSbBytes(), scriba_NewSbData(), scriba_NewSbDouble(), scriba_NewSbLong(), scriba_NewSbString(), scriba_NewSbUndef(), StringGetCharacter(), StringOpen(), and unescape().

formatParams params
 

Definition at line 3221 of file string.c.

Referenced by check_size(), if(), printChar(), printDouble(), printInt(), and while().

pJoinItem = &JoinItem
 

Definition at line 1837 of file string.c.

struct _JoinItem** pJoinItem
 

unsigned long pL
 

Definition at line 2049 of file string.c.

unsigned long pL
 

Definition at line 1991 of file string.c.

Referenced by basext_GetArgsF(), build_CountSymbolBytes(), collect_dirs_r(), and reader_ReadLines_r().

pPatternParam pLastResult
 

Definition at line 2084 of file string.c.

pPatternParam pLastResult
 

Definition at line 2046 of file string.c.

pPatternParam pLastResult
 

Definition at line 1988 of file string.c.

Referenced by allocate_MatchSets(), collect_dirs_r(), and initialize_like().

plOptionValue = OPTIONR(buffer)
 

Definition at line 2533 of file string.c.

unsigned long* plOptionValue
 

Definition at line 2519 of file string.c.

END char* pszConf
 

CONF =section string =display CONF() =title CONF("conf.key")

This function can be used to retrieve ScriptBasic configuration parameters. This is rarely needed by general programmers. This is needed only for scripts that maintain the ScriptBasic setup, for example install a new module copying the files to the appropriate location.

The argument T<"conf.key"> should be the configuration key string. If this key is not on the top level then the levels should be separated using the dot chatacter, like T<conf("preproc.internal.dbg")> to get the debugger DLL or SO file.

The return value of the function is the integer, real or string value of the configuration value. If the key is not defined or if the system manager set the key to be hidden (see later) then the function will raise an error

T<(0): error &H8:The argument passed to a module function is out of the accepted range.>

Some of the configuration values are not meant to be readable for the BASIC programs for security reasons. A typical example is the database connection password. The system manager can insert extra "dummy" configuration keys that will prevent the BASIC program to get the actual value of the configuration key. The extra configuration key has to have the same name as the key to be hidden with a T<$> sign prepended to it.

For example the MySQL connection named T<test> has the connection password under the key T<mysql.connections.test.password>. If the key in the compiled configuration file T<mysql.connections.test.$password> exists then the BASIC function T<conf()> will result error. The value of this extra key is not taken into account.

The system manager can configure whole configuration branches to be hidden from the BASIC programs. For example the configuration key T<mysql.connections.$test> defined with any value will prevent access of BASIC programs to any argument of the connection named T<test>. Similarly the key T<mysql.$connections> will prevent access to any configuration value of any MySQL connections if defined and finally the key T<$mysql> will stop BASIC programs to discover any MySQL configuration information if defined.

The current implementation does not examine the actual value of the extra security key. However later implementations may alter the behaviour of this function based on the value of the key. To remain compatible with later versions it is recommended that the extra security key is configured to have the value T<1>.

Definition at line 4070 of file string.c.

unsigned char* pszD
 

Definition at line 3556 of file string.c.

char* pszKey
 

Definition at line 4075 of file string.c.

pszOptionName = pEo->StringTable+pEo->CommandArray[_ActualNode-1].Parameter.CommandArgument.Argument.szStringValue
 

Definition at line 2491 of file string.c.

END char* pszOptionName
 

OPTION =section misc =title OPTION symbol value

Set the integer value of an option. The option can be any string without the double quote. Option names are case insensitive in ScriptBasic.

This command has no other effect than storing the integer value in the option symbol table. The commands or extenal modules may access the values and may change their behavior accoring to the actual values associated with option symbols.

You can retrieve the actual value of an option symbol using the function R<OPTIONF>

Definition at line 2487 of file string.c.

pszSecKey = ALLOC(STRLEN(Argument)+2)
 

Definition at line 4085 of file string.c.

char* pszSecKey
 

Definition at line 4076 of file string.c.

ptr = STRINGVALUE(vFormat)
 

Definition at line 3266 of file string.c.

char* ptr
 

Definition at line 3219 of file string.c.

Referenced by check_size().

else pvArgs = NULL
 

Definition at line 3576 of file string.c.

VARIABLE * pvArgs
 

Definition at line 3547 of file string.c.

else pvArgs = NULL
 

Definition at line 3247 of file string.c.

VARIABLE * pvArgs
 

Definition at line 3222 of file string.c.

q = STRINGVALUE(RESULT)
 

Definition at line 707 of file string.c.

char * q
 

Definition at line 614 of file string.c.

Quoter = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1440 of file string.c.

END VARIABLE Quoter
 

Definition at line 1428 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 1237 of file string.c.

char* r
 

Definition at line 1216 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 1124 of file string.c.

char* r
 

Definition at line 1100 of file string.c.

char* r
 

Definition at line 1059 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 1036 of file string.c.

char* r
 

Definition at line 1008 of file string.c.

char* r
 

Definition at line 944 of file string.c.

char* r
 

Definition at line 814 of file string.c.

r = STRINGVALUE(Op1)
 

Definition at line 633 of file string.c.

char* r
 

Definition at line 614 of file string.c.

r = STRINGVALUE(Op1)
 

Definition at line 537 of file string.c.

char* r
 

Definition at line 518 of file string.c.

r = STRINGVALUE(Op1)
 

Definition at line 449 of file string.c.

char* r
 

Definition at line 430 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 398 of file string.c.

r = STRINGVALUE(Op1)
 

Definition at line 385 of file string.c.

char* r
 

Definition at line 370 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 346 of file string.c.

r = STRINGVALUE(Op1)
 

Definition at line 341 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 305 of file string.c.

r = STRINGVALUE(Op1)
 

Definition at line 292 of file string.c.

char* r
 

Definition at line 277 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 252 of file string.c.

char* r
 

Definition at line 236 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 211 of file string.c.

char* r
 

Definition at line 195 of file string.c.

r = STRINGVALUE(RESULT)
 

Definition at line 124 of file string.c.

char * r
 

Definition at line 104 of file string.c.

Referenced by build_StringIndex(), BuildSubTree(), cgi_FillSymbolAndFile(), cgi_ReadHttpRequest(), CountSubTree(), dynlolib_LoadLibrary(), ex_ExpressionList(), ex_LeftValue(), ex_LeftValueList(), ex_Tag(), FtpProc(), if(), lex_Finish(), lex_HandleContinuationLines(), lex_RemoveComments(), lex_RemoveSkipSymbols(), lex_StoreCharacter(), main(), reader_IncreaseBuffer(), reader_RelateFile(), ReadFileLine(), ReadSocketLine(), regatoi(), regerror(), RemoveNil(), SPrintVariable(), switch(), and while().

long refcount
 

Definition at line 3869 of file string.c.

long refcount
 

Definition at line 1667 of file string.c.

long refcount
 

Definition at line 1565 of file string.c.

long refcount
 

Definition at line 1431 of file string.c.

int ReplaceAll
 

Definition at line 612 of file string.c.

RESULT = NEWMORTALSTRING(cbResult)
 

Definition at line 3686 of file string.c.

RESULT = NEWMORTALSTRING(params.bufPtr)
 

Definition at line 3426 of file string.c.

else RESULT = NULL
 

Definition at line 2539 of file string.c.

RESULT = NEWMORTALSTRING(pLastResult->pcbParameterArray[index])
 

Definition at line 2461 of file string.c.

RESULT = NEWMORTALSTRING(lResultLength)
 

Definition at line 1902 of file string.c.

RESULT = NEWMORTALSTRING(lLength)
 

Definition at line 1372 of file string.c.

RESULT = NEWMORTALSTRING(lLength+1)
 

Definition at line 1329 of file string.c.

RESULT = CONVERT2STRING(Op)
 

Definition at line 1278 of file string.c.

RESULT = NEWMORTALSTRING(lStringLength)
 

Definition at line 1235 of file string.c.

RESULT = NEWMORTALLONG
 

Definition at line 1195 of file string.c.

RESULT = NEWMORTALSTRING(lStringLength)
 

Definition at line 1034 of file string.c.

RESULT = NEWMORTALSTRING(lResult)
 

Definition at line 701 of file string.c.

RESULT = NULL
 

Definition at line 578 of file string.c.

RESULT = NULL
 

Definition at line 490 of file string.c.

RESULT = NEWMORTALSTRING(lStringLength)
 

Definition at line 396 of file string.c.

RESULT = NEWMORTALSTRING(lStringLength)
 

Definition at line 344 of file string.c.

RESULT = NEWMORTALSTRING(lStringLength)
 

Definition at line 303 of file string.c.

RESULT = Op1
 

Definition at line 251 of file string.c.

RESULT = Op1
 

Definition at line 210 of file string.c.

RESULT = NEWMORTALLONG
 

Definition at line 174 of file string.c.

RESULT = NEWMORTALSTRING(lFinalStringLength)
 

Definition at line 122 of file string.c.

END VARIABLE ResultArray
 

Definition at line 1562 of file string.c.

END VARIABLE ResultArray
 

Definition at line 1428 of file string.c.

RETURN
 

Definition at line 3433 of file string.c.

RETURN
 

Definition at line 579 of file string.c.

RETURN
 

Definition at line 491 of file string.c.

s = STRINGVALUE(RESULT)
 

Definition at line 1905 of file string.c.

char* s
 

Definition at line 1826 of file string.c.

s = STRINGVALUE(RESULT) + lLength -1
 

Definition at line 1374 of file string.c.

char* s
 

Definition at line 1352 of file string.c.

s = lStringLength-1
 

Definition at line 1233 of file string.c.

s = STRINGVALUE(Op1)
 

Definition at line 1231 of file string.c.

char * s
 

Definition at line 1216 of file string.c.

char * s
 

Definition at line 1008 of file string.c.

char * s
 

Definition at line 944 of file string.c.

char * s
 

Definition at line 814 of file string.c.

s = STRINGVALUE(Op2)
 

Definition at line 644 of file string.c.

char * s
 

Definition at line 614 of file string.c.

s = STRINGVALUE(Op2)
 

Definition at line 549 of file string.c.

char * s
 

Definition at line 518 of file string.c.

s = STRINGVALUE(Op2)
 

Definition at line 461 of file string.c.

char * s
 

Definition at line 430 of file string.c.

s = r
 

Definition at line 389 of file string.c.

char * s
 

Definition at line 370 of file string.c.

s = STRINGVALUE(Op1)
 

Definition at line 347 of file string.c.

s = r
 

Definition at line 296 of file string.c.

char * s
 

Definition at line 277 of file string.c.

s = Op2 ? STRINGVALUE(Op2) : NULL
 

Definition at line 133 of file string.c.

s = Op1 ? STRINGVALUE(Op1) : NULL
 

Definition at line 127 of file string.c.

char* s
 

Definition at line 104 of file string.c.

size = STRLEN(vFormat)
 

Definition at line 3267 of file string.c.

long size
 

Definition at line 3220 of file string.c.

Referenced by hook_Init(), printChar(), return(), scriba_NewSbArgs(), serconv(), and serconvXML().

StringLen = STRLEN(Op1)
 

Definition at line 2399 of file string.c.

Referenced by unserconv().

char* Temp
 

Definition at line 1432 of file string.c.

int type
 

Definition at line 4073 of file string.c.

Referenced by cft_GetString(), if(), scriba_CallArgEx(), scriba_DestroySbArgs(), and scriba_NewSbArgs().

unsigned long uParam
 

Definition at line 3552 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 3559 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 3227 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 2523 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1840 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1356 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1303 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1269 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1219 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1148 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1103 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1062 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 1011 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 947 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 817 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 618 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 522 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 434 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 374 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 281 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 240 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 199 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 163 of file string.c.

USE_CALLER_MORTALS
 

Definition at line 107 of file string.c.

vFormat = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 3874 of file string.c.

VARIABLE vFormat
 

Definition at line 3865 of file string.c.

vFormat = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 

Definition at line 3563 of file string.c.

VARIABLE vFormat
 

Definition at line 3547 of file string.c.

vFormat = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 

Definition at line 3231 of file string.c.

VARIABLE vFormat
 

Definition at line 3222 of file string.c.

vJoiner = CONVERT2STRING(_EVALUATEEXPRESSION(CAR(nItem)))
 

Definition at line 1843 of file string.c.

VARIABLE vJoiner
 

Definition at line 1828 of file string.c.

vOptionValue = CONVERT2LONG(EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 2493 of file string.c.

VARIABLE vOptionValue
 

Definition at line 2489 of file string.c.

vRecord = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 3871 of file string.c.

VARIABLE vRecord
 

Definition at line 3865 of file string.c.

VARIABLE vStringArray
 

Definition at line 1828 of file string.c.

w = STRINGVALUE(Op3)
 

Definition at line 655 of file string.c.

char * w
 

Definition at line 614 of file string.c.

Referenced by alloc_Wrapper(), besFUNCTION(), c_symcmp(), cgi_ReadHeader(), cgi_ReadHttpRequest(), delete_Wrapper(), if(), and lex_RemoveComments().

WholeString = CONVERT2STRING(EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1673 of file string.c.

VARIABLE WholeString
 

Definition at line 1664 of file string.c.

WholeString = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1567 of file string.c.

END VARIABLE WholeString
 

SPLITA =section string =title SPLITA string BY string TO array

Split a string into an array using the second string as delimiter. If the string has zero length the array becomes undefined. When the delimiter is zero length string each array element will contain a single character of the string.

See also R<SPLIT>

Definition at line 1562 of file string.c.

WholeString = CONVERT2STRING(_EVALUATEEXPRESSION(PARAMETERNODE))
 

Definition at line 1434 of file string.c.

END VARIABLE WholeString
 

SPLITAQ =section string =title SPLITAQ string BY string QUOTE string TO array

Split a string into an array using the second string as delimiter. The delimited fields may optionally be quoted with the third string. If the string to be split has zero length the array becomes undefined. When the delimiter is a zero length string each array element will contain a single character of the string.

Leading and trailing delimiters are accepted and return an empty element in the array. For example :-

=verbatim SPLITAQ ",'A,B',C," BY "," QUOTE "'" TO Result =noverbatim will generate =verbatim Result[0] = "" Result[1] = "A,B" Result[2] = "C" Result[3] = "" =noverbatim

Note that this kind of handling of trailing and leading empty elements is different from the handling of the same by the command R<SPLIT> and R<SPLITA> which do ignore those empty elements. This command is useful to handle lines exported as CSV from Excel or similar application.

The QUOTE string is really a string and need not be a single character. If there is an unmatched quote string in the string to be split then the rest of the string until its end is considered quoted.

If there is an unmatched

See also R<SPLITA>

This command was suggested and implemented by Andrew Kingwell (T<Andrew.Kingwell@idstelecom.co.uk>)

Definition at line 1428 of file string.c.


Generated on Sun Mar 12 23:56:34 2006 for ScriptBasic by  doxygen 1.4.6-NO