1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
5 #include "GeneralTricks.h"
7 // static char *VB_Name = "GeneralTricks_Module";
10 // --- Option Compare Text
12 double ValEx(char *TS)
16 // Extends the Val() function for
17 // german-style number-representing strings
21 i = InStr(1, TS, ",");
25 RS = Right(TS, strlen(TS) - i);
26 ValEx = Val(CAT(LS, ".", RS));
36 void INC(int *VAR, int Delta)
41 void DEC(int *VAR, int Delta)
48 char *MySplit(char *TS, char *Sep, long SCount)
53 long i, J, k, q, L, SL;
81 RA = REDIM_1D(sizeof(char), 0, J + 1 - 1);
100 /* !!! CHECK IF THIS IS REALLY NEEDED !!! */
101 RA[q] = Mid(T, i, k - i);
111 T = Right(T, L - i + 1);
117 if (Right(T, SL) == Sep)
119 T = Left(T, Len(T) - SL);
128 strcpy(&RA[q], T); // RA(q) = T
138 void MyReplace(char *TS, char *Pat1, char *Pat2)
140 long k, SL1, SL2, TL;
145 k = InStr(1, TS, Pat1);
151 TS = CAT(Left(TS, k - 1), Pat2, Right(TS, TL - k - SL1 + 1));
153 k = InStr(k + SL2, TS, Pat1);