<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Am 08.01.2017 um 18:22 schrieb Sven Barth:<br>
    <blockquote
cite="mid:CAFMUeB_jn=Y1abH0gLReR4s-PWZo2f0krHMaiow2jFVOmzNC8w@mail.gmail.com"
      type="cite">
      <p>Am 08.01.2017 17:32 schrieb "Bernd Oppolzer" <<a
          moz-do-not-send="true"
          href="mailto:bernd.oppolzer@t-online.de">bernd.oppolzer@t-online.de</a>>:<br>
        ><br>
        > Am 08.01.2017 um 11:46 schrieb Sven Barth:<br>
        >><br>
        >> On 08.01.2017 10:55, Ryan Joseph wrote:<br>
        >>><br>
        >>> I’m going to attempt to translate a perlin noise
        function (from <a moz-do-not-send="true"
          href="https://gist.github.com/Flafla2/f0260a861be0ebdeef76">https://gist.github.com/Flafla2/f0260a861be0ebdeef76</a>)
        but there are a few things that stopped me from starting.<br>
        >>><br>
        >>> 1) What is & doing in this assignment? I see
        this many places in assignments.<br>
        >>><br>
        >>> int h = hash & 15;<br>
        >><br>
        >> That's an "and".<br>
        ><br>
        ><br>
        > Please keep in mind that & is a bitwise and in C<br>
        > whereas && is a logical and;<br>
        > this makes much difference and has to be implemented or
        converted differently<br>
        > with Pascal, IMO.<br>
        ><br>
        > the closest equivalence to bitwise and in Pascal are set
        intersections, IMO.</p>
      <p>The closest equivalence to bitwise and in Pascal is bitwise
        and. <br>
        The operators "and", "or", "xor" and "not" are logical or
        bitwise depending on their arguments.</p>
      <p>Regards,<br>
        Sven</p>
      <br>
    </blockquote>
    <br>
    This depends on the Pascal compiler you use; <br>
    the old Wirth "Standard" yields syntax errors, if you use and etc.
    on types<br>
    other than boolean: <br>
    <br>
    <tt>1  LINE #  D/NEST  LVL     < STANFORD PASCAL, OPPOLZER
      VERSION OF 01.2017 >    18:32:47  08.01.2017    PAGE   1</tt><tt><br>
    </tt><tt>   ------  ------ 
---                                                                                
      ---- ---</tt><tt><br>
    </tt><tt><br>
    </tt><tt>        1           ) program TESTAND ( OUTPUT ) ;</tt><tt><br>
    </tt><tt>        2           ) </tt><tt><br>
    </tt><tt>        3           ) var X , Y : INTEGER ;</tt><tt><br>
    </tt><tt>        4    360D  1) </tt><tt><br>
    </tt><tt>        5    360D  1) begin (* HAUPTPROGRAMM *)</tt><tt><br>
    </tt><tt>        6           )   X := 12 ;</tt><tt><br>
    </tt><tt>        7      1N  1)   Y := 25 ;</tt><tt><br>
    </tt><tt>        8      1N  1)   WRITELN ( 'x and y' , X and Y ) ;</tt><tt><br>
    </tt><tt>     ****                                              E134</tt><tt><br>
    </tt><tt>        9      1N  1) end (* HAUPTPROGRAMM *) .</tt><tt><br>
    </tt><tt><br>
    </tt><tt>     ****       1 SYNTAX ERROR(S) DETECTED.</tt><tt><br>
    </tt><tt>     ****       9 LINE(S) READ,    0 PROCEDURE(S) COMPILED,</tt><tt><br>
    </tt><tt>     ****      17 P_INSTRUCTIONS GENERATED,   0.02 SECONDS
      IN COMPILATION.</tt><tt><br>
    </tt><tt><br>
    </tt><tt>     ****  LAST ERROR/WARNING ON LINE -->   8</tt><tt><br>
    </tt><tt><br>
    </tt><tt>     ****  ERROR/WARNING CODES FOR THIS PROGRAM :</tt><tt><br>
    </tt><tt>     ****   134 : ILLEGAL TYPE OF
      OPERAND(S).                                  </tt><tt><br>
    </tt><br>
    I agree that bitwise and etc. is a useful extension and will <br>
    put it on my to-do list. <br>
    <br>
    Have a nice day. <br>
    <br>
    Kind regards<br>
    <br>
    Bernd<br>
    <br>
  </body>
</html>