Shop OBEX P1 Docs P2 Docs Learn Events
Bigger or equal to — Parallax Forums

Bigger or equal to

william chanwilliam chan Posts: 1,326
edited 2008-03-03 07:42 in Propeller 1
Hi,

How come when I do

if seconds >= 60 ' bigger or equal to 60
.......

it does not work?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-03 07:25
    because it's =>, all operators which have a = last (wth the sole exception of ==) is a short hand assignment operator, so a <= b is the same as a:= a < b. Just remember += and remember all operators that have an equal sign in the same position (except ==)·is an assignment operator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • dfletchdfletch Posts: 165
    edited 2008-03-03 07:26
    That is an assignment operator. You want "=>", not ">=". See p250 "Operators" in the manual.

    UPDATE: Paul is too quick [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Join us in the Un-Official Propeller IRC channel: irc.freenode.net #propeller
    Newbies, oldies, programmers, math professors, and everyone in-between welcome!
    Propeller IRC howto
  • william chanwilliam chan Posts: 1,326
    edited 2008-03-03 07:42
    Thanks a lot.
    I guess SPIN is just different from PC programming languages like C or Prolog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
Sign In or Register to comment.