mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Was just wondering if anyone knows why mIRC was designed to completely ignore multiple spaces in everything?

Example, people can't talk using double spaces. $exists will not return $true if the file has a double space in the name!. $findfile() only returns files in single spaced character format.

I was just wondering if anyone has a clue to why mIRC was designed like this? If so please reply. =)


Live to Dream & Dream for Life
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$exists() correctly handles double spaces, as do all internal identifiers and some internal commands (/returnex, /var, /set). When you say $findfile() doesn't I assume you mean in the internal command parameter, in which case it is because it uses the $N syntax which is where mIRC does strip consecutive spaces (which is why no custom commands or identifiers can currently support them). If you look at the Feature Suggestions section I suggested a specific identifier to return the full file/dirname in $findfile() and $finddir() just a couple of days ago, so who knows, maybe that'll be supported in the future.

As for why commands were designed the way they are, you have to remember that mIRC's scripting language was not originally intended to be a fullblown programming language as some people use it today. Some of the design choices made (presumably) for simplicity 12 years ago may be frustrating now, but back then they probably seemed like the best thing to do. And who back then could've guessed where it would end up today?

Of course these days it'd be nice if there were a few extra methods around to make things simpler for those who did want to preserve spaces. Personally I'd like to see a /echoex command and a new set of $pN identifiers for custom commands/aliases which supported null tokens (and therefore consecutive spaces).


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Additionally, spaces.dll is a wonderful 3rd party dll for working with multiple spaces.


Link Copied to Clipboard