Quick Search for:  in language:    
DONT,VOTEthis,simply,help,person,wants,make,f
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,290,928. lines
 Jobs: 215. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login





Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!WheelCipher Encryption
By Michael D. on 1/5

(Screen Shot)

Blackjack games ver 1.0
By Yu Jiunn Shyang on 1/4


Click here to see a screenshot of this code!Transparent Tiler
By Roger Gilchrist on 1/4

(Screen Shot)

bitblt example with invintory, levels, and chat.
By Mike Aka Sono on 1/4


Game Programming Dilemma (DirectX or OpenGL?)
By abandoned_progr ammer on 1/4


Click here to see a screenshot of this code![[ XP Theme
By Pamela RAI on 1/4

(Screen Shot)

____Transparent class module____
By Mathieu Chartier on 1/4


[[ a1 Tie Remote MySQL DB to MSHflexgrid
By Pamela RAI on 1/4


Click here to see a screenshot of this code!internet logger, updated see info
By stephen whittle on 1/4

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

if you want to make any kind of calculator...

Print
Email
 

Submitted on: 11/23/2003 9:52:41 AM
By: Bryant Zadegan  
Level: Beginner
User Rating: Unrated
Compatibility:VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0, VB Script, ASP (Active Server Pages) , VBA MS Access, VBA MS Excel

Users have accessed this article 300 times.
 
(About the author)
 
     DONT VOTE!!!!!!!!!!!!!!!!!!!!!!!!!!!! this is simply to help the person who wants to make his furst good program

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
I looked at the microsoft calculator today and entered the command 0^0 (zero to the zero power), and the response i got was astonishing! last i checked, 0^0 is undefined. The Microsoft calc sed it was one!. i later hacked the calculator open and, as no surprise, discovered a simple if-then statement was responsible. the statement very simply sed: (actual control names not used) (All names of subs and functions simulated) If lblDisp.caption="0" then ..... If xUPy = true then call finResult(1) ..... End If
What it SHOULD HAVE BEEN: call doMicrosoftMath (x, y, toPower) or it could have been: If lblDisp.caption="0" then ..... If xUPy = true then If x = 0 and y = 0 then Call finResult(Undefined!) Else call finResult(1) End If
End If
..... End If
What am i trying to say? If youre going to make a calculator that takes x to the y power, make sure that 0^0 is undefined! otherwise, your calculators will be criticized the way I laid microsoft down just now! also, use common sense have the calculator actually DO THE MATH rather than follow wimpy if-then statements!!!!! for those of you that dont know how to do the topower thing, watch: Function ToPower(num1 As Long, num2 As Long) As Long
'Bring num1 to the power (exponent) of n ' um2 On Error GoTo error ToPower = Val(num1) ^ Val(num2) Exit Function error: MsgBox Err.Description, vbExclamation, "Error" End Function
--excerpt from Infrared's source.bas math is done here: x^y where the ^ is the actual operator. to call, type: call ToPower (x,y) where x is the number and y is the power. to end the article i will reinforce one thing: DDOONNTT VVOOTTEE!!!!!!


Other 2 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/23/2003 3:29:46 PM:
What are you talking about?? My Win2k calc says its undefined: Result of function is undefined. Since you said dont vote, you get 0^0 globes.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/23/2003 4:52:59 PM:Bryant Zadegan
im using windows xp
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/23/2003 4:55:35 PM:Bryant Zadegan
also, as a side note, change the calculator format to scientific, and hit the x^y button
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.