chongSilk2013 Absent Member.
Absent Member.
1852 views

silkPerformer function return

Jump to solution

Wrote a function to check if dataString not empty, then return the line of xml string below, otherwise ignore

It keeps given error. Could someone help to see where i did wrong?

dclfunc
  function  dataField
  var sString: string;
  var dataString : string;
  begin
     sString := "";
    if StrIsEmpty(dataString) then
        sString := "";
     else
        sString := "\"<entry><key>fName</key><value>"+dataString+\"</value></entry>\n\"";
      end;
   return sString;
  end dataField;

0 Likes
2 Solutions

Accepted Solutions
Highlighted
ckim9 Absent Member.
Absent Member.

RE: silkPerformer function return

Jump to solution

You probably meant to write something like the following:

dclfunc

 function  dataField (dataString : string)

 : string

 var sString: string;

 begin

    sString := "";

   if StrIsEmpty(dataString) then

       sString := "";

    else

       sString := "\"<entry><key>fName</key><value>"+dataString+\"</value></entry>\n\"";

     end;

  dataField := sString;

 end dataField;

View solution in original post

0 Likes
chongSilk2013 Absent Member.
Absent Member.

RE: silkPerformer function return

Jump to solution

Thank you very much. That is what i need!

View solution in original post

0 Likes
2 Replies
Highlighted
ckim9 Absent Member.
Absent Member.

RE: silkPerformer function return

Jump to solution

You probably meant to write something like the following:

dclfunc

 function  dataField (dataString : string)

 : string

 var sString: string;

 begin

    sString := "";

   if StrIsEmpty(dataString) then

       sString := "";

    else

       sString := "\"<entry><key>fName</key><value>"+dataString+\"</value></entry>\n\"";

     end;

  dataField := sString;

 end dataField;

View solution in original post

0 Likes
chongSilk2013 Absent Member.
Absent Member.

RE: silkPerformer function return

Jump to solution

Thank you very much. That is what i need!

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.