You are here: PSPad forum > English discussion forum > Expert: simultaneous mathematical calculations
Posted by: maki | Date: 2020-04-10 10:31 | IP: IP Logged
I need help.
Could someone write me a simple script or mini application for simultaneous mathematical calculations?
Each last number is automatically added and divided by the same number to two decimal places.
Exaple:
Import text:
09+75+54+65+38+64+69+74+12+51+18+49+23+05+32+35+37+07+53+67
05+32+24+18+10+43+15+56+80+34+23+65+25+17+48+78+72+33+50+71
40+76+29+16+14+31+30+51+52+12+64+54+62+10+35+36+43+08+46+09
Replace with and calculate:
09+75+54+65+38+64+69+74+12+51+18+49+23+05+32+35+37+07+53+67 : 67 =
05+32+24+18+10+43+15+56+80+34+23+65+25+17+48+78+72+33+50+71 : 71 =
40+76+29+16+14+31+30+51+52+12+64+54+62+10+35+36+43+08+46+09 : 09 =
Posted by: maki | Date: 2020-04-14 12:35 | IP: IP Logged
I can do it in a Browser Javascript Console, but how do I split it into individual lines in PSPad?
Add:
[2, 2.8125, 2.975]
Replace Multiline result
2
2.8125
2.975
Posted by: maki | Date: 2020-04-14 13:38 | IP: IP Logged
[
].join('\n'),
Posted by: maki | Date: 2020-04-14 14:09 | IP: IP Logged
Too much data:
"Uncaught SyntaxError: Unexpected end of input"
Posted by: Vany | Date: 2020-04-17 15:35 | IP: IP Logged
hi, wouldn't you even try some spreadsheet calculator (LibreOffice, MS Excel, etc.)?
--
Vany
(PSPad 5.5.1.790 x32, W10h/p x64 en/cs)
Posted by: maki | Date: 2020-04-19 07:44 | IP: IP Logged
I've never used it and I don't know how to use it.
Posted by: pspad | Date: 2020-04-19 07:49 | IP: IP Logged
Time to learn something new.
Posted by: maki | Date: 2020-04-22 15:40 | IP: IP Logged
I know how to fully support CSV, but how to get summary results?
Why use overrated and too slow software like MS Excel (NOT FREEWARE) and Libre, if there are even more powerful and faster tools for super-large databases?
Here you need a too complicated replace expression decimal, or what program that will know that e.g.
11.43 = 11
and 12.53 = 13
12.5 = 12 and 13
Bad expression for range 1 to 80 (integer only)
(?:-?[1-9]\d*$)|(?:^0)
Ignore
Example:
1.123
OR
1,123
Edited 4 time(s). Last edit at 2020-04-22 15:45 by maki.
Posted by: pspad | Date: 2020-04-22 16:20 | IP: IP Logged
If you know work with databases, import your CSV into table and use SQL command to replace it with rounded value
Posted by: pspad | Date: 2020-04-22 17:00 | IP: IP Logged
PSPad can calculate expression in selection:
Round(11.43)
You can write script and use scripting capabilities (JScript or VBScript) to round up your values line by line or write results into new documents
Editor PSPad - freeware editor, © 2001 - 2023 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR