Announcement

Collapse
No announcement yet.

math question: negative numbers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • math question: negative numbers

    Hi;

    How can I know if I write from input is a negative number?

  • #2
    Originally posted by naxo View Post
    Hi;

    How can I know if I write from input is a negative number?
    First, at level of string, checking if the left most character is a "-" (minus), using String.Left function.

    Second, you could convert the string to a number, and check if it is < 0.
    We are slowly invading your planet to teach lazy humans to read the user manual.
    But don't be scared: we are here to help.

    Comment


    • #3
      Hi, ok I get it, its seems that "-" is too a string (i was not too sure on that)
      I was thinking in using tostring but I was wondering how do I get that. Thanks!

      Comment

      Working...
      X