home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 263,247 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to All   
   Re: extending MySQL on VMS   
   06 Sep 25 19:20:58   
   
   From: arne@vajhoej.dk   
      
   On 9/6/2025 3:44 PM, Arne Vajhøj wrote:   
   > Anyway I can easily add the schema thing from extended ISO   
   > Pascal.   
   >   
   > program main3(input,output);   
   >   
   > type   
   >     weird_array = array [-2..-1] of array [2..3] of integer;   
   >     twodim_integer_array(n1,n2,n3,n4:integer) = array [n1..n2] of array   
   [n3..n4] of integer;   
   ...> procedure extstyle(a : twodim_integer_array);   
   >   
   > var   
   >     i, j : integer;   
   >   
   > begin   
   >     for i := lower(a, 1) to upper(a, 1) do begin   
   >        for j := lower(a, 2) to upper(a, 2) do begin   
   >           write(a[i,j]);   
   >        end;   
   >        writeln;   
   >     end;   
   > end;   
   >   
   > var   
   >     a : weird_array;   
   >     ax : twodim_integer_array(-2,-1,2,3);   
   >     i, j : integer;   
   >   
   > begin   
   ...>     for i := -2 to -1 do   
   >        for j := 2 to 3 do   
   >           ax[i,j] := i * j;   
   >     extstyle(ax);   
   > end.   
      
   The schema version is a bit special in nature.   
      
   The closest similar I could come up with is this C++:   
      
   #include    
   #include    
      
   using namespace std;   
      
   template   
   void f(array,N1> a)   
   {   
        for(int i = 0; i < N1; i++)   
        {   
            for(int j = 0; j < N2; j++)   
            {   
                cout << " " << a[i][j];   
            }   
            cout << endl;   
        }   
   }   
      
   int main()   
   {   
        array,2> a = { -4, -6 , -2, -3 };   
        f(a);   
        return 0;   
   }   
      
   which seems close functionally but I suspect are   
   implemented very differently.   
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca