Project

General

Profile

Actions

Feature #5454

closed

Add floor division support on /set and /var commands

Added by westor (GR) over 2 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
11/28/2021
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

Hello,

It would be much helpful to add floor division in AdiiRC on /set and /var commands as this one is a missing feature from mSL at all (LOL).

Example:

/var %a 10 // 4 or /set %a 10 // 4
Should save %a variable as 2

- Thanks!

Actions #1

Updated by Per Amundsen over 2 years ago

  • Status changed from New to Rejected

Neither client can do that since it would break scripts having this pattern in the value, there could be a flag to do it, but since $calc can already do it, it's just more bloat/waste of time.

Actions #2

Updated by Oui Ouims over 2 years ago

Both clients can do that. I do not understand why you're arguing like that
You're basically arguing that addding floor division to $calc did not have the (same) potential of breaking scripts, whatsoever.
But that is not how it works (unfortunately): before adding floor division to $calc, (let's make an example)my script was expecting 0 from using floor division, now, my script is broken because I don't get 0. That's how it works.
So with regard to that, I hope I demonstrated there are equal chances a script may break from adding floor division to $calc than adding it to /set, therefore since it was added to $calc, it makes no sense not to add it to /set.

It could be a waste of time for adiirc, this report was initially made when talking about mIRC, which has terrible $calc performance, with time sensitive script such as online gaming, using set -l %var N // N2 is far faster than the equivalent set -l %var $calc(N // N2), still a bloat from many perspectives, but asking for fast $calc is not an option in mIRC ;)

Having $numtok and $gettok(,0,C) is definitely a bloat, this one is a very soft bloat compared to that.

Actions #3

Updated by Per Amundsen over 2 years ago

If mirc decides to implement this and break backwards comparability, adiirc will follow, until then, adiirc should be compatible with mirc as it is today.

Actions #4

Updated by Oui Ouims over 2 years ago

Yeah fair enough, I did suggest it for mIRC but it didn't get added so maybe you guys have the same feeling on backward compat.

Actions #5

Updated by Per Amundsen over 2 years ago

I don't really care that much about backwards comparability, I only care about mirc compatibility so scripts written for mirc in most cases also works the same on adiirc.

If not for mirc compatibility, there would be no point in having msl in the first place, there are better languages.

Actions

Also available in: Atom PDF