|
@@ -134,8 +134,10 @@ LINKCOUNTED DATASET(r) ABC -> size32_t countAbc, const byte * * abc
|
|
|
<programlisting><emphasis role="bold">ECL C++ [Linux in brackets]</emphasis>
|
|
|
DATA xyz size32_t & __lenResult, void * & __result
|
|
|
STRING xyz size32_t & __lenResult, char * & __result
|
|
|
+CONST STRING xyz size32_t lenXyz, const char * xyz
|
|
|
QSTRING xyz size32_t & __lenResult, char * & __result
|
|
|
UNICODE xyz size32_t & __lenResult, UChar * & __result
|
|
|
+CONST UNICODE xyz size32_t & __lenResult, const UChar * & __result
|
|
|
DATA<nn> xyz void * __result
|
|
|
STRING<nn> xyz char * __result
|
|
|
QSTRING<nn> xyz char * __result
|
|
@@ -159,6 +161,25 @@ STREAMED DATASET(r)
|
|
|
|
|
|
<programlisting>void process(size32_t & __lenResult, char * & __result,
|
|
|
size32_t lenValue, char * value, int len);</programlisting>
|
|
|
+
|
|
|
+ <para>A function that takes a string parameter should also have the type
|
|
|
+ prefixed by <emphasis role="bold">const</emphasis> in the ECL code so that
|
|
|
+ modern compilers don't report errors when constant strings are passed to
|
|
|
+ the function. </para>
|
|
|
+
|
|
|
+ <programlisting>BOOLEAN isUpper(const string mystring) := BEGINC++
|
|
|
+ size_t i=0;
|
|
|
+ while (i < lenMystring)
|
|
|
+ {
|
|
|
+ if (!isupper((byte)mystring[i]))
|
|
|
+ return false;
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ENDC++;
|
|
|
+isUpper('JIM');
|
|
|
+
|
|
|
+</programlisting>
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="BeginCPP_Available_Options">
|