mIRC Home    About    Download    Register    News    Help

Print Thread
#267312 20/05/20 09:54 PM
Joined: Oct 2017
Posts: 47
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2017
Posts: 47
I saw in the past a lot of codes having $min and $max identifiers as custom, will the new $min and $max cause problem there? if yes then lets find a new name about them,

Also it would be nice if there were some examples about anything new for beta testers to be able to understand the clear new addition purpose to test them hardly for any bug.

Can you saw here some $min or $max examples so we can test these 2 new identifiers ?

DooMaster #267313 21/05/20 01:59 AM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Collision with existing custom alias names would happen each time a new identifier is added, and can't be avoided without having a moratorium on new identifiers, which isn't a good solution. It happened with https://forums.mirc.com/ubbthreads.php/topics/265240/need-code-help when the $zip identifier was added.

A solution to allow an existing script's $min to work in spite of the new identifier is to edit the script to use $/min(parms go here), which will always execute the alias, regardless whether there's a built-in of the same name.

Using $~NameOfIdentifier format is the only way I know of checking whether a script is running in a future version having a new identifier of a particular name. It isn't perfect because there's no guarantee that the syntax for the new identifier would be compatible with the parms you use when checking. However, we don't otherwise have an "$isidentifier" function to check for it.

Even if $isalias(sha256) is $true, that doesn't guarantee that $sha256(parms) executes your alias instead of a built-in one, without having the script knowing which version added that identifier as built-in. However $/sha256(parms) will always execute your alias or fail with an error if it's not there.

maroon #267314 21/05/20 02:30 AM
Joined: Oct 2017
Posts: 47
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2017
Posts: 47
I agree to be an $isidentifier(name) that will match if the given name is a build-in identifier or not, that would make things more clear.

e.g: $isidentifier(zip)

Last edited by DooMaster; 21/05/20 02:30 AM.

Link Copied to Clipboard