Read Mode

Float Function ver.1.1 in Batch by kvc

As you know previously with some mathematical tricks and Proper algorithm of code, We've defined the Float values 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 upto 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 ... as It do not allows 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 user want 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. 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 and 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.

Float function in batch by kvc
Help Menu of Ver.1.1

Firstly, the code of Float function ver.1.1 by Kvc is smaller as compare to ver.1.0 (a little bit) and a new functionality of saving output of desired calculation directly to a variable, like a function returns a value in variable. Now you can easily use float function in your batch file without adding an unwanted and undesired extra code into your file.

Usage Example...
Usage Example of ver.1.1

If you still didn't understand that 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...


If you're still not cleared 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 a 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'... as He wants the world to be a better place... same we want... #respect

Keep sharing, keep learning...
Be happy, Spread happiness...


  1. Thank you, but from a bat-file, right after going through the line float [operation] my bat is terminated, and I still have many lines to go...
    This happens with or without giving the variable (result) to put the result in.
    Without giving a variable the result is shown in cmd and the bat file terminated
    Giving a variable to put the result in, the saving operation is performed and the bat file is terminated

    1. Yeah, After reading your comment we also noticed that problem...and we got a solution to this... You can watch this video in order to Fix this problem in your batch file...

      Thanks for your feedback...

  2. i see now that the trick was to use

    Now it is working. Thank you


Powered by Blogger.