Click here to Skip to main content
15,914,642 members
Home / Discussions / Database
   

Database

 
QuestionRe: Decimals in integer operations Pin
shreekar28-Jul-10 6:20
shreekar28-Jul-10 6:20 
AnswerRe: Decimals in integer operations Pin
Eddy Vluggen28-Jul-10 6:33
professionalEddy Vluggen28-Jul-10 6:33 
GeneralRe: Decimals in integer operations Pin
shreekar28-Jul-10 6:35
shreekar28-Jul-10 6:35 
GeneralRe: Decimals in integer operations Pin
Eddy Vluggen28-Jul-10 6:53
professionalEddy Vluggen28-Jul-10 6:53 
AnswerRe: Decimals in integer operations Pin
shreekar28-Jul-10 6:34
shreekar28-Jul-10 6:34 
GeneralRe: Decimals in integer operations Pin
David Skelly28-Jul-10 6:38
David Skelly28-Jul-10 6:38 
AnswerRe: Decimals in integer operations Pin
David Skelly28-Jul-10 6:37
David Skelly28-Jul-10 6:37 
AnswerRe: Decimals in integer operations Pin
Luc Pattyn28-Jul-10 6:35
sitebuilderLuc Pattyn28-Jul-10 6:35 
in most programming languages, when all numbers are integer, division will truncate. You can promote a (sub)expression to floating-point in several ways: by inserting a floating constant, by having at least one floating variable, by casting, by converting.

As a simple experiment, I would prefix 1.0* to whatever expression you are having.

Warning: this rule also applies to subexpressions, so 2/5 will be zero, whereas 1.0*2/5 would not!

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Decimals in integer operations Pin
shreekar28-Jul-10 6:56
shreekar28-Jul-10 6:56 
GeneralRe: Decimals in integer operations Pin
Luc Pattyn28-Jul-10 7:25
sitebuilderLuc Pattyn28-Jul-10 7:25 
GeneralRe: Decimals in integer operations Pin
David Skelly28-Jul-10 22:28
David Skelly28-Jul-10 22:28 
QuestionMSAccess 2003 flexGrid Error loading ActiveX Pin
SarahMcM28-Jul-10 1:50
SarahMcM28-Jul-10 1:50 
AnswerRe: MSAccess 2003 flexGrid Error loading ActiveX Pin
Eddy Vluggen28-Jul-10 5:19
professionalEddy Vluggen28-Jul-10 5:19 
GeneralRe: MSAccess 2003 flexGrid Error loading ActiveX Pin
SarahMcM28-Jul-10 12:02
SarahMcM28-Jul-10 12:02 
AnswerRe: MSAccess 2003 flexGrid Error loading ActiveX Pin
SarahMcM28-Jul-10 16:27
SarahMcM28-Jul-10 16:27 
QuestionMs Access 2000 and Linked Tables to SQL 2005 - Update Record Problem Pin
Simon_Whale28-Jul-10 1:24
Simon_Whale28-Jul-10 1:24 
QuestionSelect * from @TableName Pin
AndieDu27-Jul-10 21:21
AndieDu27-Jul-10 21:21 
AnswerRe: Select * from @TableName Pin
N a v a n e e t h27-Jul-10 21:24
N a v a n e e t h27-Jul-10 21:24 
GeneralRe: Select * from @TableName Pin
AndieDu27-Jul-10 21:33
AndieDu27-Jul-10 21:33 
AnswerRe: Select * from @TableName Pin
Jörgen Andersson27-Jul-10 21:44
professionalJörgen Andersson27-Jul-10 21:44 
GeneralRe: Select * from @TableName Pin
AndieDu27-Jul-10 22:22
AndieDu27-Jul-10 22:22 
GeneralRe: Select * from @TableName Pin
Jörgen Andersson27-Jul-10 22:37
professionalJörgen Andersson27-Jul-10 22:37 
AnswerRe: Select * from @TableName Pin
Mycroft Holmes27-Jul-10 22:33
professionalMycroft Holmes27-Jul-10 22:33 
AnswerRe: Select * from @TableName Pin
AndieDu27-Jul-10 22:59
AndieDu27-Jul-10 22:59 
GeneralRe: Select * from @TableName Pin
small_programmer28-Jul-10 2:24
small_programmer28-Jul-10 2:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.