Absent Member.
Absent Member.
1362 views

View Array values

Jump to solution

Good morning all. I realize you can access the contents of an array via the index. However, I can't seem to find a way to print or view the contents of an array. I want to see the values so I can select valid entries.

Thanks!

Tony

0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.

This is how I do it for dynamic arrays, capturing data at run time and printing out the values (or use writeln)

array_SIZE := 10; //set your array size

arrayOf_things   : array[array_SIZE]      of string; // define your array

   WebParseHtmlBoundArray(arrayOf_things, array_SIZE, ToEncoding("left bound"), ToEncoding("right bound"), NumMatchesFound, WEB_FLAG_IGNORE_WHITE_SPACE | WEB_FLAG_CASE_SENSITIVE);

   WebFormGet("Some web request");

 Print("DEBUG - Num <name your things> found: " + NumMatchesFound);

for i := 1 to NumMatchesFound do  

  Print("DEBUG - value at array index  "+ i+ "   " + arrayOf_things);

end;

I hope this helps!

View solution in original post

0 Likes
2 Replies
Absent Member.
Absent Member.

This is how I do it for dynamic arrays, capturing data at run time and printing out the values (or use writeln)

array_SIZE := 10; //set your array size

arrayOf_things   : array[array_SIZE]      of string; // define your array

   WebParseHtmlBoundArray(arrayOf_things, array_SIZE, ToEncoding("left bound"), ToEncoding("right bound"), NumMatchesFound, WEB_FLAG_IGNORE_WHITE_SPACE | WEB_FLAG_CASE_SENSITIVE);

   WebFormGet("Some web request");

 Print("DEBUG - Num <name your things> found: " + NumMatchesFound);

for i := 1 to NumMatchesFound do  

  Print("DEBUG - value at array index  "+ i+ "   " + arrayOf_things);

end;

I hope this helps!

View solution in original post

0 Likes
Absent Member.
Absent Member.

Thanks, I figured I'd probably have to iterate through the array. I was hoping there was an easier answer. Something along the lines of "ListPrint" or something. Oh well, hi ho hi ho it's off to iterate I go.

Thanks again,

Tony

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.