Read Mode

Getlen Function ver.2.0 by Kvc

Getlen Function ver.2.0 by Kvc
A Preview of Batch Code
The Getlen Function ver.2.0 By Kvc is an Upgrade to the previous function. As you know that we’ve created the ver.1.0 with using the Cpp programming. The ver.1.0 was Faster and efficient than repeating the loops in Any Batch file. So, we used it as a Plugin of cpp in batch programming. But, few days before when I was surfing the internet, finding the algorithm of printing a circle or some mathematical manipulation of equation of a circle. I came across a New batch program, which tells the length of the string passed to it. When I analyzed the algorithm of this program, it results in more faster and efficient than the conventional ‘Getlen function ver.1.0’ that we are using till date. The Program was not well arranged for using it as a Batch function, so we decided to modify it a little and make it ver.2.0 of the Getlen function.
Getlen Function ver.2.0 by Kvc
A preview on Desktop
The problem with the previous version of the Getlen Function was that even though it was fast enough, but it is a compiled plugin of the CPP programming, and the compilation results in the unwanted size increase of the plugin. It is around 100 KB’s of File, thus results in unwanted Disk space usage.

The ver.2.0 is much smaller in size (Approx. 2.0 KB, including Comments in the file) and faster than version 1.0. The version 1.0 takes 20 ms time for returning the length of string “Karan”, while version 2.0 takes 10 ms time for the same task.

robvanderwoude's batch plugin
Comparison of version 1.0 and 2.0
Here, we are using The RC.bat function by RobVanderWoude for checking the ‘Return Code’ and ‘Return Time’ of both the versions of the function.
The usage of Getlen function ver.2.0 is similar to the previous Function version, as #TheBATeam don’t want to confuse the users by making changes in the usage of older and newer function. Now, if you’ve used the Getlen function ver.1.0 in any of your batch program, you can simply replace the getlen.exe with this getlen.bat file. The program will work normally, as CMD first searches for all possible extensions of the file that you are calling from the Main file. If it will not find the ‘Exe’ in the possible directories then it will look for the bat files.

Getlen Function ver.2.0 by Kvc
Help Menu
The Following picture will show you the Usage of the getlen function ver.2.0 in the normal cmd console environment. You can Try ‘Getlen /?’ for More Information on the usage in a Batch file.

Getlen Function ver.2.0 by Kvc
We hope you like it, if you find Any Flaw or you have any Query then Feel free to Leave Comments about this function. Do motivate us via your precious comments.

Keep learning, Keep Sharing,
Be Happy, Spread Happiness…


No comments:

Powered by Blogger.