Folks, I get a TYPE MISMATCH complaint fm ASP when I do the following in
trying to extract the high-order four bits. The complaint being that the
strTemp value is a string. Well, yes - it's a 1-char string.
NumTemp = MidB(strTemp,1, 1) And &Hf0
What am I doing wrong? (Something dumb, I'm sure, but ... .)
AS 6 2329
Are you trying to concatenate? Use & instead of And.
Ray at work
"Arnold Shore" <as****@saefern.org> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl... Folks, I get a TYPE MISMATCH complaint fm ASP when I do the following in trying to extract the high-order four bits. The complaint being that the strTemp value is a string. Well, yes - it's a 1-char string.
NumTemp = MidB(strTemp,1, 1) And &Hf0
What am I doing wrong? (Something dumb, I'm sure, but ... .)
AS
No. As I said, I'm trying to extract the HO bits. Thanks,
AS
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl... Are you trying to concatenate? Use & instead of And.
Ray at work
"Arnold Shore" <as****@saefern.org> wrote in message news:uq**************@TK2MSFTNGP09.phx.gbl... Folks, I get a TYPE MISMATCH complaint fm ASP when I do the following
in trying to extract the high-order four bits. The complaint being that the strTemp value is a string. Well, yes - it's a 1-char string.
NumTemp = MidB(strTemp,1, 1) And &Hf0
What am I doing wrong? (Something dumb, I'm sure, but ... .)
AS
"Arnold Shore" <as****@saefern.org> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl... Folks, I get a TYPE MISMATCH complaint fm ASP when I do the following
in trying to extract the high-order four bits. The complaint being that
the strTemp value is a string. Well, yes - it's a 1-char string.
NumTemp = MidB(strTemp,1, 1) And &Hf0
What am I doing wrong? (Something dumb, I'm sure, but ... .)
NumTemp = AscB(strTemp) And &HF0
Notes:
1. No need to extract the first character, Asc/AscB/AscW only act on the
first character in a string.
2. Here is the reference page for Asc/AscB/AscW in vbscript : http://msdn.microsoft.com/library/en...l/vsfctasc.asp
HTH-
Chris Hohmann
Yep. Now back to my question: How do I extract the extract the high-order
four bits of a given Byte value?
The logical "And" for that requires a numeric expression, and I have a Byte.
AS
"Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
news:ex**************@TK2MSFTNGP11.phx.gbl...
.... Notes: 1. No need to extract the first character, Asc/AscB/AscW only act on the first character in a string. 2. Here is the reference page for Asc/AscB/AscW in vbscript:
http://msdn.microsoft.com/library/en...l/vsfctasc.asp
HTH- Chris Hohmann
"Arnold Shore" <as****@saefern.org> wrote in message
news:eB**************@tk2msftngp13.phx.gbl... Yep. Now back to my question: How do I extract the extract the
high-order four bits of a given Byte value?
The logical "And" for that requires a numeric expression, and I have a
Byte.
TypeName(MidB("SomeString",1,1)) => String
TypeName(AscB("SomeString")) => Byte
Did you try the following line?
NumTemp = AscB(strTemp) And &HF0
HTH
-Chris Hohmann
an example in javascript :
<script language="javascript">
var a = 255;
alert (a & 0xf0); // should return 240
</script>
"Arnold Shore" <as****@saefern.org> wrote in message
news:eB**************@tk2msftngp13.phx.gbl... Yep. Now back to my question: How do I extract the extract the
high-order four bits of a given Byte value?
The logical "And" for that requires a numeric expression, and I have a
Byte. AS
"Chris Hohmann" <hohmannATyahooDOTcom> wrote in message news:ex**************@TK2MSFTNGP11.phx.gbl... ... Notes: 1. No need to extract the first character, Asc/AscB/AscW only act on the first character in a string. 2. Here is the reference page for Asc/AscB/AscW in vbscript:
http://msdn.microsoft.com/library/en...l/vsfctasc.asp
HTH- Chris Hohmann
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michael |
last post by:
Hi,
I am writting a ASP which will accept lots of data from user interface page.
Is there a way that show me the each field or key name and value?
For example;
From the user interface page, ...
|
by: titusjava |
last post by:
Hello
I would like to know, is any easy way to getname of the XML tag and
value of the XML tag inside a <xsl:foreach> loop.
Thanks in advance
Titus
|
by: charlie_M |
last post by:
I figured out via various help from this forum...
EXAMPLE:
onClick="document.forms.MYBUTTON.value='SIMPLE';document.forms.submit()"
In my CGI I see "MYBUTTON" = "SIMPLE"
and this works...
|
by: Stephanie Yao via .NET 247 |
last post by:
Hi, I've done something on the conversion between int32 and byte,here is my code:
1, I convert byte to an int:
int regInt = BitConverter.ToInt32(regBytes, 0);
this.tbRID.Text =...
|
by: Wasim Akram |
last post by:
Hi,
I have a field "Month" in my SQL server table. The type of this field is
"tinyint".
Now what I am doing in the code is using DataRow to read this field in a
'int' variable.
int month...
|
by: Martin |
last post by:
Dear Group
Sorry for bothering you again but I need expert advice on this.
I have placed a HTML textbox on my aspx form and converted it to run
as a server control. At some point in my code I...
|
by: Roger |
last post by:
I want to fill a combo box with a Text value to show like name, but when it
is selected I want to get the say SS# or Emp #.
I will be filling this in manually how should I go about this.
I...
|
by: pariforum |
last post by:
Pls let me know Difference between char and byte data types in core java
|
by: Jess |
last post by:
Hello,
I tried several books to find out the details of object
initialization. Unfortunately, I'm still confused by two specific
concepts, namely default-initialization and...
|
by: jyohere |
last post by:
What is the difference between character and byte stream......Pls explain me in detail.......How is the internal mapping done .....its probably very difficult to understand....when we read from...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |