Board index » delphi » logical operators in pascal, help!

logical operators in pascal, help!

Dear Sirs,

I would like to know if somebody has already
implemented logical operators in pascal language
(such as OR, AND, and NOT).

I will very appreciate if anybody could send them
to me.

Thanks in advance!

Best regards,

     Leonardo

Cordialmente,

     Leonardo

   "Quem espera sempre alcanca, se trabalha enquanto espera"

 

Re:logical operators in pascal, help!


I don't sure if standard pascal have it,but
TurboPascal,FreePascal,GPC,..
have.(i will be surprised if standard haven't it)

Try "if (a>0)and(b>0) then writeln('Hello,World!');"
If you mean operations on arrays of bits like integer,it's also possible
is all pascal implementations i know.
writeln(23 and 1); shows "1"

Leonardo Barbosa e Oliveira wrote:

Quote

> Dear Sirs,

> I would like to know if somebody has already
> implemented logical operators in pascal language
> (such as OR, AND, and NOT).

> I will very appreciate if anybody could send them
> to me.

> Thanks in advance!

> Best regards,

>      Leonardo

> Cordialmente,

>      Leonardo

>    "Quem espera sempre alcanca, se trabalha enquanto espera"

Re:logical operators in pascal, help!


Quote
> I would like to know if somebody has already
> implemented logical operators in pascal language
> (such as OR, AND, and NOT).

> I will very appreciate if anybody could send them
> to me.

var a,b,c:boolean;

a:=not b;
b:=a and c;
c:= a or b;

--
Azarien

[delete the letter v from my e-mail address]

Re:logical operators in pascal, help!


On Thu, 3 Jul 2003 14:04:46 -0300, Leonardo Barbosa e Oliveira

Quote
<l...@dcc.ufmg.br> wrote:
>I would like to know if somebody has already
>implemented logical operators in pascal language
>(such as OR, AND, and NOT).

They're built in to the language.

Re:logical operators in pascal, help!


Quote
"Jan Philips" <judmccrNOSP...@bellsouth.net> wrote in message

news:bc5bgvgpc0psufs25htibalhd3lmu9or9b@4ax.com...

Quote
> On Thu, 3 Jul 2003 14:04:46 -0300, Leonardo Barbosa e Oliveira
> <l...@dcc.ufmg.br> wrote:

> >I would like to know if somebody has already
> >implemented logical operators in pascal language
> >(such as OR, AND, and NOT).

> They're built in to the language.

No the're not.

Other Threads