VBForums - Other BASIC
http://www.vbforums.com/
Post your questions and answers about other forms of BASIC here. Quick Basic, QBasic, Real Basic, Power Basic, and whatever other Basic you can find.enMon, 15 Jul 2019 18:21:34 GMTvBulletin60http://www.vbforums.com/images/misc/rss.pngVBForums - Other BASIC
http://www.vbforums.com/
How to round to the nearest 40 using Basic ocde
http://www.vbforums.com/showthread.php?876527-How-to-round-to-the-nearest-40-using-Basic-ocde&goto=newpost
Tue, 09 Jul 2019 01:22:09 GMTI am a novice with basic code, but need to develop a calculation where, if my SampleVol variable = 10, the final reported value gets rounded to the nearest multiple of 40 i.e. 136 would round to 120, and 157 would round to 160 etc. If anything else, its rounded to the nearest 200 (which i was going to acheive using the ROUNDTO function.)

'Calculate SO3 in process liquors according to SOP LQ07

Variables are defined as an inherent part of the LIMS basic subroutine, but have been declared here for testing.

How would people best recommend this be achieved?
]]>Other BASICtiffnee20http://www.vbforums.com/showthread.php?876527-How-to-round-to-the-nearest-40-using-Basic-ocde