As you know previously with some mathematical tricks and Proper algorithm of code. We’ve defined the Float value calculations in batch programming by Float Function ver.1.0. As we already know that in cmd (conventional calculation technique using ‘set /a’).
We can only perform mathematical operations on the integers and there is no scope for precise calculation up to some decimal places. But the float function ver.1.0 gave some hope to the batch programmers. That now they can do some real mathematics, that we normally want in real.
But still, as you know that ‘Nothing can be perfect’. The ver.1.0 of this float function by kvc also got some shortcomings or flaws. It does not allow the User to save the output value directly to a variable.
Instead of this, the function only displays the corresponding result on the cmd console directly, even when the user wants it or not. And that’s pretty bad, as Computers must work as we want from them. We are Humans and it’s enough to make them work according to us, otherwise, there’s no need for them in this world.
We came to know this problem of Float function ver.1.0 when we got a mail and Comment from Mr. Lilián luna de Valencia, notifying us about the problem he’s facing while using this function from his batch file as He’s not getting the expected result.
What’s New in this Version?
We’ve solved his problem by telling him to add 3 lines of code to their batch file for the required functioning of their batch file. But then #TheBATeam thought that this limitation of ver.1.0 makes the usage difficult. It violates our goal of ‘making things easier in batch programming‘. So, we decided that it’s the time to launch for ver.1.1 of the Float function.
We are really thankful to Mr. Lilián luna de Valencia, for their sincere feedback.
The ver.1.1 contains approximately very few updates (that’s why it is ver.1.1 instead of being 2.0), But they worth to be added as to update the function. so now without wasting any time let us have a look at the ver.1.1 and the updates that are Done.
Firstly, the code of Float function ver.1.1 by Kvc is smaller as compare to ver.1.0 (a little bit). New functionality of saving the output of desired calculation directly to a variable, like a function returns a value in the variable. Now you can easily use float function in your batch file without adding an unwanted, undesired extra code into your file.
If you still didn’t understand how to use this Function in your batch program for making it more easy and effective. You can clear all your doubts by just watching the videos embedded below this Paragraph.
FLOAT FUNCTION VER.1.1 IN BATCH
If you’re still not clear about the usage of Float function ver.1.1 by Kvc in cmd console or batch file. Just post a comment in Cmd FAQ section. we’ll try to clear your doubts.
If you like our work in the field of batch programming, do comment because your one comment can motivate us. So, Use the Power of ‘You’ to make this world a Better Place.
Last week, I came to know about the name ‘Aaron Swartz’ from one of my good friend ‘Kulbir Kaur’. When I read about his life and work, I was like ‘salute you man’. So I’m dedicating this post to ‘Aaron Swartz’s He wants the world to be a better place same we want… #respect
Keep sharing, keep learning…
Be happy, Spread happiness…