26

Its strange how a space can change the meaning of a statement.
Where 5! = 120 and also 5!=120, both are true.

Comments
  • 0
    Invalid left hand assignment of constant 5!.
  • 0
    @kwilliams That is factorial 😑
  • 0
    You can't assign (single equals) 120 to the factoral of 5, which is a compile time constant of 120.
  • 0
    @kwilliams Think mathematical
  • 4
    Damnit, Jim... I'm a programmer not a mathematician.
  • 0
    @AlexDeLarge I am comparing mathematical factorial with logical not equal 😑
  • 0
    @AlexDeLarge the later one is simple c language.
    And the first one is what we are taught at elementary school "maths"
  • 1
    @AlexDeLarge actually I think this is a good example of an ambiguous grammar.
    Upvoted
  • 0
    @SoulSkrix @AlexDeLarge
    Nothing prevents you to have both factorial and not-eq in a new programming language you're designing.

    You just have to be careful about the tokenization of the symbols.

    Maybe the explanation of the OP was wrong, but it makes sense if you assume both strings are snippets of the same programming language, whatever it is.
  • 0
    Thank you all for whatever you want to say.
Add Comment