Here is a description of my problem...
call mysub (5, 10)
sub mysub (valA, valB)
response.write valB
valA = valA - 1
response.write valB
end sub
this should print out 10 followed by 10.
it doesn't.
it prints 10 followed by 9.
it is taking the 1 off the wrong variable! HOW!
it is not a typo, I've got everyone in the office to check out my code, it
is a real genuine unbelievable bug.
is it known? is it fixable?
Tim
-- 8 1759
Assuming that you've typed your code correctly, you never do any math
against valB. (No offence meant, but I'm having trouble taking this
question seriously - IF you've typed your code correctly, that is)
"Tim" <me@nottellingyou.com> wrote in message
news:Ov**************@TK2MSFTNGP10.phx.gbl... Here is a description of my problem...
call mysub (5, 10)
sub mysub (valA, valB) response.write valB valA = valA - 1 response.write valB end sub
this should print out 10 followed by 10. it doesn't. it prints 10 followed by 9.
it is taking the 1 off the wrong variable! HOW! it is not a typo, I've got everyone in the office to check out my code, it is a real genuine unbelievable bug.
is it known? is it fixable?
Tim
--
prints 1010 here.
IIS 5 win 2000 pro
Mike
"Tim" <me@nottellingyou.com> wrote in message
news:Ov**************@TK2MSFTNGP10.phx.gbl... Here is a description of my problem...
call mysub (5, 10)
sub mysub (valA, valB) response.write valB valA = valA - 1 response.write valB end sub
this should print out 10 followed by 10. it doesn't. it prints 10 followed by 9.
it is taking the 1 off the wrong variable! HOW! it is not a typo, I've got everyone in the office to check out my code, it is a real genuine unbelievable bug.
is it known? is it fixable?
Tim
--
I don't understand what you mean?
at least 4 people checked the code.
it is a bug.
"WIlliam Morris" <se**************@hotmail.com> wrote in message
news:bl************@ID-205671.news.uni-berlin.de... Assuming that you've typed your code correctly, you never do any math against valB. (No offence meant, but I'm having trouble taking this question seriously - IF you've typed your code correctly, that is)
"Tim" <me@nottellingyou.com> wrote in message news:Ov**************@TK2MSFTNGP10.phx.gbl... Here is a description of my problem...
call mysub (5, 10)
sub mysub (valA, valB) response.write valB valA = valA - 1 response.write valB end sub
this should print out 10 followed by 10. it doesn't. it prints 10 followed by 9.
it is taking the 1 off the wrong variable! HOW! it is not a typo, I've got everyone in the office to check out my code,
it is a real genuine unbelievable bug.
is it known? is it fixable?
Tim
--
I get expected results too. Copy and paste your exact code into a reply
here. Your sub would be the same if it were:
Sub mysub(valA, valB)
response.write valB
response.write valB
End Sub
There's something you're not telling us, or you transcribed your subroutine
wrong when you posted it here. Copy and paste it exactly as it is and post
it here.
Ray at work
"Tim" <me@nottellingyou.com> wrote in message
news:u1**************@TK2MSFTNGP12.phx.gbl... I don't understand what you mean?
at least 4 people checked the code.
it is a bug. "WIlliam Morris" <se**************@hotmail.com> wrote in message news:bl************@ID-205671.news.uni-berlin.de... Assuming that you've typed your code correctly, you never do any math against valB. (No offence meant, but I'm having trouble taking this question seriously - IF you've typed your code correctly, that is)
"Tim" <me@nottellingyou.com> wrote in message news:Ov**************@TK2MSFTNGP10.phx.gbl... Here is a description of my problem...
call mysub (5, 10)
sub mysub (valA, valB) response.write valB valA = valA - 1 response.write valB end sub
this should print out 10 followed by 10. it doesn't. it prints 10 followed by 9.
it is taking the 1 off the wrong variable! HOW! it is not a typo, I've got everyone in the office to check out my
code, it is a real genuine unbelievable bug.
is it known? is it fixable?
Tim
--
Maybe it's a variable scoping problem. Some suggestions to experiment
with:
Try parameter names of pvalA and pvalB.
Try using Option Explicit toward the top of the page and dim all your
variables in the appropriate places.
I doubt this would make a difference but try using a function instead of
a sub.
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
It outputs 10 and 10 for me, just like it should. I pasted your code
into a page right out of the message.
--
Phillip Windell [CCNA, MVP, MCP] pw******@wandtv.com
WAND-TV (ABC Affiliate) www.wandtv.com
"Tim" <me@nottellingyou.com> wrote in message
news:Ov**************@TK2MSFTNGP10.phx.gbl... Here is a description of my problem...
call mysub (5, 10)
sub mysub (valA, valB) response.write valB valA = valA - 1 response.write valB end sub
this should print out 10 followed by 10. it doesn't. it prints 10 followed by 9.
it is taking the 1 off the wrong variable! HOW! it is not a typo, I've got everyone in the office to check out my
code, it is a real genuine unbelievable bug.
is it known? is it fixable?
Tim
--
this is an exact copy, the only difference is I have removed the rest of the
sub after the point it makes it's mistake
sub showline(thesize,textsize,rs)
response.write thesize
response.write textsize
textsize=textsize-1
adcolor="white"
textcolor="black"
textcolor2="black"
response.write thesize
response.write textsize
'there is more after this point, but the damage is already done.
end sub
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:ec**************@TK2MSFTNGP09.phx.gbl... I get expected results too. Copy and paste your exact code into a reply here. Your sub would be the same if it were:
Sub mysub(valA, valB) response.write valB response.write valB End Sub
There's something you're not telling us, or you transcribed your
subroutine wrong when you posted it here. Copy and paste it exactly as it is and
post it here.
Ray at work
"Tim" <me@nottellingyou.com> wrote in message news:u1**************@TK2MSFTNGP12.phx.gbl... I don't understand what you mean?
at least 4 people checked the code.
it is a bug. "WIlliam Morris" <se**************@hotmail.com> wrote in message news:bl************@ID-205671.news.uni-berlin.de... Assuming that you've typed your code correctly, you never do any math against valB. (No offence meant, but I'm having trouble taking this question seriously - IF you've typed your code correctly, that is)
"Tim" <me@nottellingyou.com> wrote in message news:Ov**************@TK2MSFTNGP10.phx.gbl... > > Here is a description of my problem... > > call mysub (5, 10) > > sub mysub (valA, valB) > response.write valB > valA = valA - 1 > response.write valB > end sub > > this should print out 10 followed by 10. > it doesn't. > it prints 10 followed by 9. > > it is taking the 1 off the wrong variable! HOW! > it is not a typo, I've got everyone in the office to check out my code, it > is a real genuine unbelievable bug. > > is it known? is it fixable? > > > Tim > > > -- > > >
Okay, so what does this do for you?
<%
Call showline(1, 2, 0)
sub showline(thesize,textsize,rs)
response.write thesize
response.write textsize
textsize=textsize-1
response.write thesize
response.write textsize
'there is more after this point, but the damage is already done.
end sub
%>
It should return:
1211
What do you get?
Ray at work
"Tim" <me@nottellingyou.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl... this is an exact copy, the only difference is I have removed the rest of
the sub after the point it makes it's mistake
sub showline(thesize,textsize,rs)
response.write thesize response.write textsize
textsize=textsize-1 adcolor="white" textcolor="black" textcolor2="black"
response.write thesize response.write textsize
'there is more after this point, but the damage is already done.
end sub This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Herr Lucifer |
last post by:
As the founder of .NET framework, Microsoft claims that it invention will be
the next best platform for programming in a near future. Now it is 2005,
..NET is 5 years old, and can talk and walk for...
|
by: amanda992004 |
last post by:
Excluding the factors of the brain capability, i.e I am not asking
about this factor, if you are a single, aside from enjoying coding or
debugging, how do you make time to eat properly, i.e...
|
by: Morgan |
last post by:
I have read much posts on the argument but no one
clearly says if this operation is possible or not.
Simply I have a routine which reads from a text
file some integer arrays (1 or 2D).
The...
|
by: BBFrost |
last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net
2003. At first things were looking ok, now problems are starting to
appear.
So far ...
(1) ...
|
by: Cor |
last post by:
Hi,
I start a new thread about a discussion from yesterday (or for some of us
this morning). It was a not so nice discussion about dynamically removing
controls from a panel or what ever.
It...
|
by: everymn |
last post by:
Hi,
Supposedly the Alter Routine privilege can be granted at the level of
a single routine but I haven't been able to get that to work. I've
tried it a number of different ways like:
GRANT...
|
by: Bob Darlington |
last post by:
I'm using the following routine to call UpdateDiary() - below:
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo Form_BeforeUpdate_Error
Call UpdateDiary(Me!TenantCounter,...
|
by: Peter Webb |
last post by:
When I started my current extremely graphics intensive project, I ignored
advice in this ng to use the Paint method, and used the alternate
CreateGraphics approach. I thought there were some good...
|
by: pvong |
last post by:
I'm a newbie. I'm using VS2008 & VB.net
I have a simple site and each page uses the same sub-routine. I copy and
paste to each page and that's no big deal but that can get tiresome. I was...
|
by: Guy Macon |
last post by:
Serious Security Flaw in Google Chrome:
http://www.readwriteweb.com/archives/security_flaw_in_google_chrome.php
--
Guy Macon
<http://www.GuyMacon.com/>
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: 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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |