Why is Male> Female equal to TRUE in R, Excel and VBA? Like in other languages?

I am currently taking a course: Introduction to R on DataCamp and in one exercise (Battle of the sexes) there is such an instruction:

Read the code in the editor and click "Send Reply" to check if malemore ( >)female

In the above instruction, I was asked to test the following code in RStudio:

'Male' > 'Female'

To my surprise, R gave me a way out TRUE! I also tried in Excel and VBA, and both came up with outputs TRUE, too! Now I'm starting to think that they program languages ​​with sexist views (just kidding, hehe ...).

enter image description here

, , ? - ? TRUE ? ?

+4
4

R . help('>') , wikipedia collation:

" , : . . , en_US, C ( ASCII) . - : . Z S T, character-by-character - aa , ".

, ; "F" , "M" , , , Mxxx , Fyyy.

+14

, #,

   "Male" > "Female"
+4

VBA, , ASCII, .

MsgBox Asc("male") '= 109
MsgBox Asc("female") '= 102
MsgBox Asc("Male") '= 77
MsgBox Asc("Female") '= 70

"male" > "female" is true. "Male" > "female" is false.

+4

" " " > " "<" .

" " , VBA, :

b = "3"
a = 5 + b
>> a = 8 (implicit conversion of string to number)

... ( , ASCII) . "" "F" ( ), .

If you want him to be more feminist, you can compare "Madame" (a woman in French) and "Hombre" (a man in Spanish) :)

+2
source

Source: https://habr.com/ru/post/1694512/