Do I use 'or' for bitwise operations where in c# I use | ? 10 2133
Yes
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Emilio" <[void]> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Do I use 'or' for bitwise operations where in c# I use | ?
"Emilio" <[void]> schrieb: Do I use 'or' for bitwise operations where in c# I use | ?
'Or' <-> '|' (bitwise)
'OrElse' <-> '||' (logical)
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
In addition to OHM
'Or' can as well be logical however not in the way as C# that one is
'OrElse'
Cor
O.k. , so bitwise is definitly 'or' , but logical does not have
to be 'OrElse' it can be 'or' as well,
if xy=5 or abc=8 then
msgbox "hello"
end if 'Or' <-> '|' (bitwise) 'OrElse' <-> '||' (logical)
"Emilio" <[void]> schrieb: O.k. , so bitwise is definitly 'or' , but logical does not have to be 'OrElse' it can be 'or' as well, if xy=5 or abc=8 then msgbox "hello" end if
Well, in this particular case, 'True' is or'ed (bitwise) with 'True', which
results in 'True'. Behind the scenes a bitwise operation is performed.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
I thought that the "OrElse" construct just prevented the short circuit so
the next token would be processed:
A or B orelse c = something.
Thus c is not left undefined.
Aor B else c = something would leave c undefined if A or B is false.
What did I miss?
(Note that I am still coding another rather obscure language so I'm not
attempting to get the syntax correct as I learn the logic)
BobJ
"Cor Ligthert" <no************@planet.nl> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl... In addition to OHM
'Or' can as well be logical however not in the way as C# that one is 'OrElse'
Cor
OrElse is a logical operator. It first evaluates the left side of the
comparison statement, and if True does not bother evaluating the right hand
statement because it is futile to do so.
AndAlso does the same thing for an And function, if the left side is True it
wil evaluate the right side, otherwise the final result is false.
HTH
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"BobJ" <bo*@rjsolyn.com> wrote in message
news:40******************@newsread2.news.atl.earth link.net... I thought that the "OrElse" construct just prevented the short circuit so the next token would be processed: A or B orelse c = something. Thus c is not left undefined. Aor B else c = something would leave c undefined if A or B is false. What did I miss? (Note that I am still coding another rather obscure language so I'm not attempting to get the syntax correct as I learn the logic) BobJ "Cor Ligthert" <no************@planet.nl> wrote in message news:OV**************@TK2MSFTNGP10.phx.gbl... In addition to OHM
'Or' can as well be logical however not in the way as C# that one is 'OrElse'
Cor
Note that the return type is still considered to be boolean (I believe the language definition states that the bitwise operators are defined only for integral
types) - in this case it doesn't matter much what happens behind the scenes - if both operands are boolean you can think about it as a simple boolean
operator, if any of the arguments is numeric, then it will be a bitwise operator.
Also note that Or does not cause evaluation of the second argument not to occur when the first argument is true, unlike OrElse.
-------------------- From: "Herfried K. Wagner [MVP]" <hi***************@gmx.at> References: <#u**************@TK2MSFTNGP09.phx.gbl> <#o**************@TK2MSFTNGP09.phx.gbl> <OLYWZ37qEHA.2796
@tk2msftngp13.phx.gbl>Subject: Re: Do I use 'or' for bitwise operations where in c# I use | ? Date: Wed, 6 Oct 2004 18:05:48 +0200 Lines: 14 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: <eZ*************@TK2MSFTNGP15.phx.gbl> Newsgroups: microsoft.public.dotnet.languages.vb NNTP-Posting-Host: v208-105.vps.tuwien.ac.at 128.131.208.105 Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP15.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:233545 X-Tomcat-NG: microsoft.public.dotnet.languages.vb
"Emilio" <[void]> schrieb: O.k. , so bitwise is definitly 'or' , but logical does not have to be 'OrElse' it can be 'or' as well, if xy=5 or abc=8 then msgbox "hello" end if Well, in this particular case, 'True' is or'ed (bitwise) with 'True', which results in 'True'. Behind the scenes a bitwise operation is performed.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Sorry I don't take feature request for WinRes: it belongs to the .NET Framework SDK. I'm a consumer of WinRes, just like you...
--------------------From: Thomas Adams <th************@gmail.com> Newsgroups: microsoft.public.dotnet.internationalization Subject: RE: How to launch WinRes in full screen mode by another program? Date: 29 Sep 2004 19:31:46 GMT Organization: DFN.CIS Senior Customer Lines: 17 Message-ID: <Xn**********************************@127.0.0.1> References: <2q************@uni-berlin.de> <r3**************@cpmsftngxa06.phx.gbl> X-Trace: news.uni-berlin.de cGk7xWd2iWxkO9HVbF7isQODBzMeOPRUidb0ZHc/H3nGY= User-Agent: Xnews/06.08.25 X-Converter: MorVer Version 1.0.305 Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.internationalization:947 X-Tomcat-NG: microsoft.public.dotnet.internationalization
Hi
Your assumption is correct. I did not want to call out its long name since I didn't know if that could be regarded as breach of NDA. :)
Thanks for the explanation. Do you take feature requests for WinRes? I'd like to see a "remember last size and location" some day...
~T.
xu*@online.microsoft.com (Xu Yang[MSFT]) wrote:
--
[Formerly appended fullquote was nuked by morver, the versatile morphing server.]
I'm afraid that LocStudio (when you say LS, I assume you are using LocStudio) does not have the option, and WinRes does not remember its size and
location when it was shut down.
If you are trying to call it in your own application, you can always use ProcessWindowStyle.Maximized when you start the process.
--------------------From: Thomas Adams <me*@privacy.net> Newsgroups: microsoft.public.dotnet.internationalization Subject: How to launch WinRes in full screen mode by another program? Date: 11 Sep 2004 21:26:17 GMT Organization: DFN.CIS Senior Customer Lines: 9 Message-ID: <2q************@uni-berlin.de> X-Trace: news.uni-berlin.de 9sj2ViefNkwlw4tmA89WfA6mie8fmrCfbXqlIJqRehUb0= User-Agent: Xnews/06.08.25 X-Face: #Rk@TOQ|^!ZG|&z6lA@-CY>/xB[Ei1mG*&S.+A5z;Ng?3OxX[#DVZw!"o!c`S|p:(zsX-EkdZZ(IVnFRTX%!:Sv^L&Gk~s]vJ@Z~%Rm@G]fr*r2P}u5
*&k/-_2+&Qowj6hiJ1b$^JQf:uy9456HIdKq*B`NC##kyO,>7"Ztnav +=71b*"E+DIme;{i&)ii{#6e?i8P,1Xpc[q0}i:Tm];B1X-Converter: MorVer Version 1.0.305 Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.internationalization:902 X-Tomcat-NG: microsoft.public.dotnet.internationalization
Hi
Let's imagine you're using a translation environment (LS) that's launching WinRes every now and then. Is it possible to open WinRes in full screen mode in this case? It's quite annoying that it doesn't remember if I switch it to full screen mode the next time it is invoked.
thanks, Thomas
> Also note that Or does not cause evaluation of the second argument not to occur when the first argument is true, unlike OrElse.
'OrElse' will provide short-circuiting, which means that 'expression2' in
'expression1 OrElse expression2' will not be evaluated if 'expression1' is
already 'True'. 'Or' will evaluate both, 'expression1' and 'expression2',
independent from the result of 'expression1''s evaluation.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Thanks for the translation :)
-------------------- From: "Herfried K. Wagner [MVP]" <hi***************@gmx.at> References: <#u**************@TK2MSFTNGP09.phx.gbl> <#o**************@TK2MSFTNGP09.phx.gbl> <OLYWZ37qEHA.2796
@tk2msftngp13.phx.gbl> <eZ*************@TK2MSFTNGP15.phx.gbl> <8n**************@cpmsftngxa06.phx.gbl>Subject: Re: Do I use 'or' for bitwise operations where in c# I use | ? Date: Sat, 9 Oct 2004 14:29:18 +0200 Lines: 13 Organization: MVPs.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: <OM**************@TK2MSFTNGP11.phx.gbl> Newsgroups: microsoft.public.dotnet.languages.vb NNTP-Posting-Host: n643p008.adsl.highway.telekom.at 62.47.24.72 Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:234185 X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Also note that Or does not cause evaluation of the second argument not to occur when the first argument is true, unlike OrElse. 'OrElse' will provide short-circuiting, which means that 'expression2' in 'expression1 OrElse expression2' will not be evaluated if 'expression1' is already 'True'. 'Or' will evaluate both, 'expression1' and 'expression2', independent from the result of 'expression1''s evaluation.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Sorry I don't take feature request for WinRes: it belongs to the .NET Framework SDK. I'm a consumer of WinRes, just like you...
--------------------From: Thomas Adams <th************@gmail.com> Newsgroups: microsoft.public.dotnet.internationalization Subject: RE: How to launch WinRes in full screen mode by another program? Date: 29 Sep 2004 19:31:46 GMT Organization: DFN.CIS Senior Customer Lines: 17 Message-ID: <Xn**********************************@127.0.0.1> References: <2q************@uni-berlin.de> <r3**************@cpmsftngxa06.phx.gbl> X-Trace: news.uni-berlin.de cGk7xWd2iWxkO9HVbF7isQODBzMeOPRUidb0ZHc/H3nGY= User-Agent: Xnews/06.08.25 X-Converter: MorVer Version 1.0.305 Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.internationalization:947 X-Tomcat-NG: microsoft.public.dotnet.internationalization
Hi
Your assumption is correct. I did not want to call out its long name since I didn't know if that could be regarded as breach of NDA. :)
Thanks for the explanation. Do you take feature requests for WinRes? I'd like to see a "remember last size and location" some day...
~T.
xu*@online.microsoft.com (Xu Yang[MSFT]) wrote:
--
[Formerly appended fullquote was nuked by morver, the versatile morphing server.]
I'm afraid that LocStudio (when you say LS, I assume you are using LocStudio) does not have the option, and WinRes does not remember its size and
location when it was shut down.
If you are trying to call it in your own application, you can always use ProcessWindowStyle.Maximized when you start the process.
--------------------From: Thomas Adams <me*@privacy.net> Newsgroups: microsoft.public.dotnet.internationalization Subject: How to launch WinRes in full screen mode by another program? Date: 11 Sep 2004 21:26:17 GMT Organization: DFN.CIS Senior Customer Lines: 9 Message-ID: <2q************@uni-berlin.de> X-Trace: news.uni-berlin.de 9sj2ViefNkwlw4tmA89WfA6mie8fmrCfbXqlIJqRehUb0= User-Agent: Xnews/06.08.25 X-Face: #Rk@TOQ|^!ZG|&z6lA@-CY>/xB[Ei1mG*&S.+A5z;Ng?3OxX[#DVZw!"o!c`S|p:(zsX-EkdZZ(IVnFRTX%!:Sv^L&Gk~s]vJ@Z~%Rm@G]fr*r2P}u5
*&k/-_2+&Qowj6hiJ1b$^JQf:uy9456HIdKq*B`NC##kyO,>7"Ztnav +=71b*"E+DIme;{i&)ii{#6e?i8P,1Xpc[q0}i:Tm];B1X-Converter: MorVer Version 1.0.305 Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.internationalization:902 X-Tomcat-NG: microsoft.public.dotnet.internationalization
Hi
Let's imagine you're using a translation environment (LS) that's launching WinRes every now and then. Is it possible to open WinRes in full screen mode in this case? It's quite annoying that it doesn't remember if I switch it to full screen mode the next time it is invoked.
thanks, Thomas This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike Hodkin |
last post by:
As a beginning student of C++, books reference "bitwise operators" and give
brief examples, but I have not read a good explanation of what they are used
for. One reference mentioned that they are...
|
by: Alex Vinokur |
last post by:
Consider the following statement:
n+i, where i = 1 or 0.
Is there more fast method for computing n+i than direct computing that sum?
--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT...
|
by: Joe Gonzalez |
last post by:
Is it possible to perform bitwise operations in selects in DB2 8.1? In
postgres I can say something like SELECT ... FROM <sometable> WHERE
RecFlags && 0x08 <> 0 to get a bitwise and operation. I...
|
by: jas_lx |
last post by:
The basic understanding of what bitwise operators (& ^ | >> << ) comes
fairly simple, as long as one has a fundamental understanding of bits,
bytes and binary.
Having done some Win32...
|
by: Paul E Collins |
last post by:
Suppose I have a few Keys objects:
Keys k1 = Keys.V; // V
Keys k2 = Keys.Control | Keys.V; // Ctrl+V
Keys k3 = Keys.Shift | Keys.J; // Shift+J
I need to determine which of these include the...
|
by: John Davis |
last post by:
One interesting observation I found is VB6 or VB.NET overloads = opeartor.
i.e. = operator has 2 meanings.
Case 1: relational operator. In other languages, usually use == instead.
If a = b Then...
|
by: Carl Banks |
last post by:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days. One of the main uses of bit
fields is flags, but that's not...
|
by: snorble |
last post by:
I started creating a simple "bits" class, intended to act like a array
of bits. This was my initial idea, basically just overriding the
string representation to display the bitmask (so far):
...
|
by: Rob Wilkerson |
last post by:
I'm attempting to do some work around existing code that uses bitwise
operations to manage flags passed into a function and I'm quite
frankly unequipped to do so. I've never done much with bitwise...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |