Math

Things you’d like to miss in the future...
Post Reply
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Math

Post by tiago »

How can I make XY get me the answer '4.854.589.897' for echo(4.854.589.899 - 2); , or even echo(4.854.589.899 - 0.000.000.002); (not a choice, if I'm asked) ? Currently it does 4.854 instead...
It stands for a GB vs bytes calculation of difference I'm working with.


Suggestion:


'gettoken' could allow negative values like in 'sel' and 'substr'.

$ext = gettoken("new text.txt", -1, "."); // txt

similar effect to "get selecteditemsnames" but working with a list:


$path = gettoken("C:\Arquivos de programas\Messenger\", -2, "\"); // "Messenger" out of a list, instead of being limited to "<curbase>" when it's not selected
$path = gettoken("C:\Arquivos de programas\Messenger", -1, "\"); // "Messenger" out of a list, instead of being limited to "<curbase>" when it's not selected
Power-hungry user!!!

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Math

Post by tiago »

I believe I found a bug with the "COPYAS" script function

Other little bug: copyas "*_copy.?", "<curpath>"; won't do the expected; instead, it will generate a file named "<curpath>*_copy.?" in the upper directory. To get the desired effect, currently we must add manually the final "\", like this: copyas "*_copy.?", "<curpath>\";
Power-hungry user!!!

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Math

Post by zer0 »

Your first post) Is formatbytes of help here?
Your second post) Irrelevant to this thread and <curpath> is an unslashed path, so it's not a bug.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Math

Post by tiago »

Works fine, thnx!
Power-hungry user!!!

Post Reply