/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
AND operator
Fra : Aykurt Altintas


Dato : 20-11-01 10:26

I am using the and operator forbitwise comparison as follows

a=1111
b=1101

MsgBox a And b

The return value is 1093.

I should get 1101. Does anyone know the error?

Thx
Aykurt Altintas



 
 
Mikkel Bundgaard (20-11-2001)
Kommentar
Fra : Mikkel Bundgaard


Dato : 20-11-01 17:33

Aykurt Altintas <aya@force.dk> wrote in message
news:W8nK7.208$6F1.3187223573@news.euroconnect.net...
> I am using the and operator forbitwise comparison as follows
>
> a=1111
> b=1101
>
> MsgBox a And b
>
> The return value is 1093.
>
> I should get 1101. Does anyone know the error?
>
> Thx
> Aykurt Altintas
Hi Aykurt

You are working on integers (or longs) therefore the assignments are
integer values and not bit values. So
a=10001010111
b=10001001101
a And b = 10001000101 = 1093

So there is no error
--
Mikkel Bundgaard
IT University of Copenhagen
http://officehelp.gone.dk
ICQ# 116946261
Se SpaceCommunicator - en peer-to-peer chat-applikation i Java



Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408847
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste