home bbs files messages ]

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

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

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

   Message 1,281 of 2,978   
   Heinrich Wolf to All   
   Re: const assignment not the same?   
   04 Feb 05 09:01:50   
   
   From: Me@Privacy.net   
      
   Have you ever used C#? It seems to me, that C# develops towards pascal. Have   
   you once seen PL/M? I also encourage you to ask java, ada and even cobol   
   programmers for their experiences. In my opinion it is a good choice to   
   restrict the use of a language to only those elements which allow cross   
   compiling into other languages. There are not many elements in pascal, which   
   are in conflict to this aim, but many in C.   
      
   compact example in C:   
      
   int i = 50;   
   for (j =1; ++j < i;)   
     if ((int k = 1 << j) > 0x10)   
       break;   
      
   you can also write C like this:   
      
   #define i 50   
   int j, k, loop;   
   j = 1;   
   ++j;   
   loop = j < i;   
   while (loop)   
     {   
     k = 1 << j;   
     if (k > 0x10)   
      loop = 0;   
     ++j;   
     if (! j < i)   
       loop = 0;   
     }   
      
   This is much easier to cross-compile into pascal.   
      
   const i = 50;   
   var j, k : Integer;   
   var loop : Boolean;   
   begin   
     j := 1;   
     inc(j);   
     loop := j < i;   
     while (loop) do   
       begin   
          k := 1 shl j;   
          if k > $10 then   
            loop := false;   
          inc(j);   
          if not j < i then   
            loop := false;   
       end;   
   end.   
      
   --- 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