WeixiangYan/CodeTransOcean huggingface dataset:
Task: Palindrome detection



C#: using System;

class Program
{
    static string Reverse(string value)
    {
        char[] chars = value.ToCharArray();
        Array.Reverse(chars);
        return new string(chars);
    }

    static bool IsPalindrome(string value)
    {
        return value == Reverse(value);
    }

    static void Main(string[] args)
    {
        Console.WriteLine(IsPalindrome("ingirumimusnocteetconsumimurigni"));
    }
}







COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Palindrome detection


C++: #include <string>
#include <algorithm>

bool is_palindrome(std::string const& s)
{
  return std::equal(s.begin(), s.end(), s.rbegin());
}








COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Palindrome detection





Java: public static boolean pali(String testMe){
	StringBuilder sb = new StringBuilder(testMe);
	return testMe.equals(sb.reverse().toString());
}





COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Palindrome detection







Python: def is_palindrome(s):
  return s == s[::-1]



COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Palindrome detection








VB: function Squish( s1 )
	dim sRes
	sRes = vbNullString
	dim i, c
	for i = 1 to len( s1 )
		c = lcase( mid( s1, i, 1 ))
		if instr( "abcdefghijklmnopqrstuvwxyz0123456789", c ) then
			sRes = sRes & c
		end if
	next
	Squish = sRes
end function
		
function isPalindrome( s1 )
	dim squished
	squished = Squish( s1 )
	isPalindrome = ( squished = StrReverse( squished ) )
end function


COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Palindrome detection




Go: 
var str;
str = argument0

str = string_lettersdigits(string_lower(string_replace(str,' ','')));
var inv;
inv = '';

var i;
for (i = 0; i < string_length(str); i += 1;)
    {
    inv += string_copy(str,string_length(str)-i,1);
    }

return (str == inv);






COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Palindrome detection






PHP: <?php
function is_palindrome($string) {
  return $string == strrev($string);
}
?>
Task: Palindrome detection






PHP: <?php
function is_palindrome($string) {
  return $string == strrev($string);
}
?>






Ada: function Palindrome (Text : String) return Boolean is
begin
   for Offset in 0..Text'Length / 2 - 1 loop
      if Text (Text'First + Offset) /= Text (Text'Last - Offset) then
         return False;
      end if;
   end loop;
   return True;
end Palindrome;
Task: Palindrome detection






PHP: <?php
function is_palindrome($string) {
  return $string == strrev($string);
}
?>




COBOL:        identification division.
       function-id. palindromic-test.

       data division.
       linkage section.
       01 test-text            pic x any length.
       01 result               pic x.
          88 palindromic       value high-value
                               when set to false low-value.

       procedure division using test-text returning result.

       set palindromic to false
       if test-text equal function reverse(test-text) then
           set palindromic to true
       end-if

       goback.
       end function palindromic-test.
Task: Loop over multiple arrays simultaneously



C#: class Program
{
    static void Main(string[] args)
    {
        char[] a = { 'a', 'b', 'c' };
        char[] b = { 'A', 'B', 'C' };
        int[] c = { 1, 2, 3 };
        int min = Math.Min(a.Length, b.Length);
        min = Math.Min(min, c.Length);
        for (int i = 0; i < min; i++)
            Console.WriteLine("{0}{1}{2}", a[i], b[i], c[i]);
    }             
}









Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously

C: #include <stdio.h>

char a1[] = {'a','b','c'};
char a2[] = {'A','B','C'};
int a3[] = {1,2,3};

int main(void) {
    for (int i = 0; i < 3; i++) {
        printf("%c%c%i\n", a1[i], a2[i], a3[i]);
    }
}











Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously


C++: #include <iostream>
#include <vector>

int main(int argc, char* argv[])
{
   std::vector<char> ls(3); ls[0] = 'a'; ls[1] = 'b'; ls[2] = 'c';
   std::vector<char> us(3); us[0] = 'A'; us[1] = 'B'; us[2] = 'C';
   std::vector<int> ns(3);  ns[0] = 1;   ns[1] = 2;   ns[2] = 3;

   std::vector<char>::const_iterator lIt = ls.begin();
   std::vector<char>::const_iterator uIt = us.begin();
   std::vector<int>::const_iterator nIt = ns.begin();
   for(; lIt != ls.end() && uIt != us.end() && nIt != 
ns.end();
       ++lIt, ++uIt, ++nIt)
   {
      std::cout << *lIt << *uIt << *nIt << "\n";
   }
}










Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously




Go: package main

import "fmt"

var a1 = []string{"a", "b", "c"}
var a2 = []byte{'A', 'B', 'C'}
var a3 = []int{1, 2, 3}

func main() {
	for i := range a1 {
		fmt.Printf("%v%c%v\n", a1[i], a2[i], a3[i])
	}
}








Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously





Java: module LoopOverMultipleArrays
    {
    @Inject Console console;

    void run()
        {
        Char[]   chars   = ['a', 'b', 'c'];
        String[] strings = ["A", "B", "C"];
        Int[]    ints    = [ 1,   2,   3 ];

        console.print("Using array indexing:");
        for (Int i = 0, Int longest = chars.size.maxOf(strings.size.maxOf(ints.size)); i < longest; ++i)
            {
            console.print($|{i < chars.size   ? chars[i].toString() : ""}\
                           |{i < strings.size ? strings[i]          : ""}\
                           |{i < ints.size    ? ints[i].toString()  : ""}
                         );
            }

        console.print("\nUsing array iterators:");
        val charIter   = chars.iterator();
        val stringIter = strings.iterator();
        val intIter    = ints.iterator();
        while (True)
            {
            StringBuffer buf = new StringBuffer();
            if (Char ch := charIter.next())
                {
                buf.add(ch);
                }
            if (String s := stringIter.next())
                {
                s.appendTo(buf);
                }
            if (Int n := intIter.next())
                {
                n.appendTo(buf);
                }
            if (buf.size == 0)
                {
                break;
                }
            console.print(buf);
            }
        }
    }







Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously







Python: >>> print ( '\n'.join(''.join(x) for x in 
zip('abc', 'ABC', '123')) )
aA1
bB2
cC3
>>>





Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously








VB: 

Sub Main()
	a = Array("a","b","c")
	b = Array("A","B","C")
	c = Array(1,2,3)
	For i = LBound(a) To UBound(a)
		buf = buf & vbCrLf & a(i) & b(i) & c(i)
	Next
	Debug.Print Mid(buf,3)
End Sub




Ada: with Ada.Text_IO;  use Ada.Text_IO;

procedure Array_Loop_Test is
   type Array_Index is range 1..3;
   A1 : array (Array_Index) of Character := "abc";
   A2 : array (Array_Index) of Character := "ABC";
   A3 : array (Array_Index) of Integer   := (1, 2, 3);
begin
   for Index in Array_Index'Range loop
      Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3 
(Index))(2));
   end loop;
end Array_Loop_Test;
Task: Loop over multiple arrays simultaneously

C: #include <stdio.h>

char a1[] = {'a','b','c'};
char a2[] = {'A','B','C'};
int a3[] = {1,2,3};

int main(void) {
    for (int i = 0; i < 3; i++) {
        printf("%c%c%i\n", a1[i], a2[i], a3[i]);
    }
}
Task: Loop over multiple arrays simultaneously



C#: class Program
{
    static void Main(string[] args)
    {
        char[] a = { 'a', 'b', 'c' };
        char[] b = { 'A', 'B', 'C' };
        int[] c = { 1, 2, 3 };
        int min = Math.Min(a.Length, b.Length);
        min = Math.Min(min, c.Length);
        for (int i = 0; i < min; i++)
            Console.WriteLine("{0}{1}{2}", a[i], b[i], c[i]);
    }             
}
Task: Loop over multiple arrays simultaneously


C++: #include <iostream>
#include <vector>

int main(int argc, char* argv[])
{
   std::vector<char> ls(3); ls[0] = 'a'; ls[1] = 'b'; ls[2] = 'c';
   std::vector<char> us(3); us[0] = 'A'; us[1] = 'B'; us[2] = 'C';
   std::vector<int> ns(3);  ns[0] = 1;   ns[1] = 2;   ns[2] = 3;

   std::vector<char>::const_iterator lIt = ls.begin();
   std::vector<char>::const_iterator uIt = us.begin();
   std::vector<int>::const_iterator nIt = ns.begin();
   for(; lIt != ls.end() && uIt != us.end() && nIt != 
ns.end();
       ++lIt, ++uIt, ++nIt)
   {
      std::cout << *lIt << *uIt << *nIt << "\n";
   }
}
Task: Loop over multiple arrays simultaneously





Java: module LoopOverMultipleArrays
    {
    @Inject Console console;

    void run()
        {
        Char[]   chars   = ['a', 'b', 'c'];
        String[] strings = ["A", "B", "C"];
        Int[]    ints    = [ 1,   2,   3 ];

        console.print("Using array indexing:");
        for (Int i = 0, Int longest = chars.size.maxOf(strings.size.maxOf(ints.size)); i < longest; ++i)
            {
            console.print($|{i < chars.size   ? chars[i].toString() : ""}\
                           |{i < strings.size ? strings[i]          : ""}\
                           |{i < ints.size    ? ints[i].toString()  : ""}
                         );
            }

        console.print("\nUsing array iterators:");
        val charIter   = chars.iterator();
        val stringIter = strings.iterator();
        val intIter    = ints.iterator();
        while (True)
            {
            StringBuffer buf = new StringBuffer();
            if (Char ch := charIter.next())
                {
                buf.add(ch);
                }
            if (String s := stringIter.next())
                {
                s.appendTo(buf);
                }
            if (Int n := intIter.next())
                {
                n.appendTo(buf);
                }
            if (buf.size == 0)
                {
                break;
                }
            console.print(buf);
            }
        }
    }
Task: Loop over multiple arrays simultaneously







Python: >>> print ( '\n'.join(''.join(x) for x in 
zip('abc', 'ABC', '123')) )
aA1
bB2
cC3
>>>
Task: Loop over multiple arrays simultaneously








VB: Module Program
    Sub Main()
        Dim a As Char() = {"a"c, "b"c, "c"c}
        Dim b As Char() = {"A"c, "B"c, "C"c}
        Dim c As Integer() = {1, 2, 3}

        Dim minLength = {a.Length, b.Length, c.Length}.Min()
        For i = 0 To minLength - 1
            Console.WriteLine(a(i) & b(i) & c(i))
        Next

        Console.WriteLine()

        For Each el As (a As Char, b As Char, c As Integer) In a.Zip(b, Function(l, r) (l, r)).Zip(c, Function(x, r) (x.l, x.r, r))
            Console.WriteLine(el.a & el.b & el.c)
        Next
    End Sub
End Module
Task: Loop over multiple arrays simultaneously




Go: package main

import "fmt"

var a1 = []string{"a", "b", "c"}
var a2 = []byte{'A', 'B', 'C'}
var a3 = []int{1, 2, 3}

func main() {
	for i := range a1 {
		fmt.Printf("%v%c%v\n", a1[i], a2[i], a3[i])
	}
}
Task: Loop over multiple arrays simultaneously



C#: class Program
{
    static void Main(string[] args)
    {
        char[] a = { 'a', 'b', 'c' };
        char[] b = { 'A', 'B', 'C' };
        int[] c = { 1, 2, 3 };
        int min = Math.Min(a.Length, b.Length);
        min = Math.Min(min, c.Length);
        for (int i = 0; i < min; i++)
            Console.WriteLine("{0}{1}{2}", a[i], b[i], c[i]);
    }             
}








Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously


C++: #include <iostream>
#include <vector>

int main(int argc, char* argv[])
{
   std::vector<char> ls(3); ls[0] = 'a'; ls[1] = 'b'; ls[2] = 'c';
   std::vector<char> us(3); us[0] = 'A'; us[1] = 'B'; us[2] = 'C';
   std::vector<int> ns(3);  ns[0] = 1;   ns[1] = 2;   ns[2] = 3;

   std::vector<char>::const_iterator lIt = ls.begin();
   std::vector<char>::const_iterator uIt = us.begin();
   std::vector<int>::const_iterator nIt = ns.begin();
   for(; lIt != ls.end() && uIt != us.end() && nIt != 
ns.end();
       ++lIt, ++uIt, ++nIt)
   {
      std::cout << *lIt << *uIt << *nIt << "\n";
   }
}









Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously

C: #include <stdio.h>

char a1[] = {'a','b','c'};
char a2[] = {'A','B','C'};
int a3[] = {1,2,3};

int main(void) {
    for (int i = 0; i < 3; i++) {
        printf("%c%c%i\n", a1[i], a2[i], a3[i]);
    }
}










Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously





Java: module LoopOverMultipleArrays
    {
    @Inject Console console;

    void run()
        {
        Char[]   chars   = ['a', 'b', 'c'];
        String[] strings = ["A", "B", "C"];
        Int[]    ints    = [ 1,   2,   3 ];

        console.print("Using array indexing:");
        for (Int i = 0, Int longest = chars.size.maxOf(strings.size.maxOf(ints.size)); i < longest; ++i)
            {
            console.print($|{i < chars.size   ? chars[i].toString() : ""}\
                           |{i < strings.size ? strings[i]          : ""}\
                           |{i < ints.size    ? ints[i].toString()  : ""}
                         );
            }

        console.print("\nUsing array iterators:");
        val charIter   = chars.iterator();
        val stringIter = strings.iterator();
        val intIter    = ints.iterator();
        while (True)
            {
            StringBuffer buf = new StringBuffer();
            if (Char ch := charIter.next())
                {
                buf.add(ch);
                }
            if (String s := stringIter.next())
                {
                s.appendTo(buf);
                }
            if (Int n := intIter.next())
                {
                n.appendTo(buf);
                }
            if (buf.size == 0)
                {
                break;
                }
            console.print(buf);
            }
        }
    }






Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously







Python: >>> print ( '\n'.join(''.join(x) for x in 
zip('abc', 'ABC', '123')) )
aA1
bB2
cC3
>>>




Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously








VB: Module Program
    Sub Main()
        Dim a As Char() = {"a"c, "b"c, "c"c}
        Dim b As Char() = {"A"c, "B"c, "C"c}
        Dim c As Integer() = {1, 2, 3}

        Dim minLength = {a.Length, b.Length, c.Length}.Min()
        For i = 0 To minLength - 1
            Console.WriteLine(a(i) & b(i) & c(i))
        Next

        Console.WriteLine()

        For Each el As (a As Char, b As Char, c As Integer) In a.Zip(b, Function(l, r) (l, r)).Zip(c, Function(x, r) (x.l, x.r, r))
            Console.WriteLine(el.a & el.b & el.c)
        Next
    End Sub
End Module



Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously






PHP: $a = array('a', 'b', 'c');
$b = array('A', 'B', 'C');
$c = array('1', '2', '3'); //These don't *have* to be strings, but it 
saves PHP from casting them later

if ((sizeOf($a) !== sizeOf($b)) || (sizeOf($b) !== sizeOf($c))){
  throw new Exception('All three arrays must be the same length');
}
foreach ($a as $key => $value){
  echo "{$a[$key]}{$b[$key]}{$c[$key]}\n";
}





Fortran: program main
 implicit none

 integer,parameter :: n_vals = 3
 character(len=*),dimension(n_vals),parameter :: ls = ['a','b','c']
 character(len=*),dimension(n_vals),parameter :: us = ['A','B','C']
 integer,dimension(n_vals),parameter          :: ns = [1,2,3]

 integer :: i  

 do i=1,n_vals
      write(*,'(A1,A1,I1)') ls(i),us(i),ns(i)
 end do

end program main
Task: Loop over multiple arrays simultaneously

C: #include <stdio.h>

char a1[] = {'a','b','c'};
char a2[] = {'A','B','C'};
int a3[] = {1,2,3};

int main(void) {
    for (int i = 0; i < 3; i++) {
        printf("%c%c%i\n", a1[i], a2[i], a3[i]);
    }
}









COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Loop-Over-Multiple-Tables.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A VALUE "abc".
           03  A-Vals PIC X OCCURS 3 TIMES.

       01  B VALUE "ABC".
           03  B-Vals PIC X OCCURS 3 TIMES.

       01  C VALUE "123".
           03  C-Vals PIC 9 OCCURS 3 TIMES.

       01  I PIC 9.

       PROCEDURE DIVISION.
           PERFORM VARYING I FROM 1 BY 1 UNTIL 3 < I
               DISPLAY A-Vals (I) B-Vals (I) C-Vals (I)
           END-PERFORM

           GOBACK
           .