PK26 Absent Member.
Absent Member.
1261 views

Functions

Hi,

Could you please send me some reference script  for functions. I am looking some reference script with using some functions.

Tags (1)
0 Likes
2 Replies
LeeanneQ Absent Member.
Absent Member.

RE: Functions

Hi,

You can find full details on all Silk Performer functions in the Silk Performer Help file which you can find by going to HELP | CONTENTS from Silk Performer Workbench.

If you want to get an idea of all functions available in Silk Performer you can start under the ‘Benchmark Description Language (BDL) Reference’ section in the Help file.  This has all the functions divided into sections so you can easily see what’s available if you don’t already know the function name.  There are examples on how to use each function included in the Help file.

If you wish to create your own custom functions you can do so by right-clicking on the script and selecting ‘New Function’ to open the relevant wizard.  You can find further details in the Help section ‘Inserting Function Declarations’.  When you’re familiar with this you will also be able to hand-script your own custom functions using the same format.

You can also access the Silk Performer documentation here if required:

documentation.microfocus.com/.../index.jsp

If it's sample scripts you're after, you can find some under 'C:\Users\Public\Documents\Silk Performer 16.5\Samples' by default,

I hope this helps, however if you want details on specific functions in Silk Performer and can’t see what you require, please provide further details on exactly what you need and we can try to provide further guidance.

Best Regards

Leeanne

0 Likes
ckim9 Absent Member.
Absent Member.

RE: Functions

Here's an example of a function. It strips off HTML tags or anything that are enclosed in < and >. For example, if "<h1>Hello World</h1>" is passed to the function, it will return "Hello World".

dclfunc

  // strip anything that's enclosed in <...>
  function CscStripTags(pIns : string)
  : string
  var
    bInTag : boolean;
    nIdx   : number;
    nLen   : number;
    sChar  : string;
    sDest  : string;
    sTemp  : string;
  begin
    nLen   := Strlen(pIns);
    sDest  := "";
    bInTag := false;
    for nIdx := 1 to nLen do
      sChar := Substr(pIns, sTemp, nIdx, 1);
      if sChar = "<" then
        bInTag := true;
      elseif sChar = ">" then
        bInTag := false;
        sChar  := "";
      end;
      if not bInTag then
        sDest := sDest + sChar;
      end;
    end;
    CscStripTags := sDest;
  end CscStripTags;

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.