Why is the empty string less than 0?

Get help with using AutoHotkey and its commands and hotkeys
afe
Posts: 618
Joined: 06 Dec 2018, 04:36

Why is the empty string less than 0?

03 May 2020, 09:48

Why is the empty string less than 0?

Code: Select all

If a < 0
  MsgBox OK
Helgef
Posts: 4467
Joined: 17 Jul 2016, 01:02
Contact:

Re: Why is the empty string less than 0?

03 May 2020, 10:11

An empty string is less than all non empty strings.
Rohwedder
Posts: 3655
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Why is the empty string less than 0?

03 May 2020, 10:12

Hallo,
https://www.autohotkey.com/docs/Concepts.htm#uninitialised-variables
An empty string is considered to be non-numeric.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Haswell, JoeWinograd, mikeyww, murataygun, smogmanus, TAC109, WOlfen, Woolley89 and 49 guests