Shop OBEX P1 Docs P2 Docs Learn Events
CONfused — Parallax Forums

CONfused

User NameUser Name Posts: 1,451
edited 2010-09-22 21:31 in Propeller 1
What do the #0, #4, and #8 signify in this constant declaration? Is it as simple as it seems - that Dpin, Cpin, and SLpin are all numerically equal to zero? Somehow that doesn't seem right.
CON
    _clkmode = xtal1 + pll16x                           
    _xinfreq = 5_000_000

    #0,MSBPRE,LSBPRE,MSBPOST,LSBPOST  
    #4,LSBFIRST,MSBFIRST      
    #0,Dpin,Cpin,SLpin,#8,Bits

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-22 20:43
    Read the section in the Propeller Manual on the CON section.

    This notation defines a series of names, each of which is defined with a value one higher than the last. To set the first value, the # notation is used. This can appear in the middle of a sequence to reset the internal counter used by the compiler.
  • User NameUser Name Posts: 1,451
    edited 2010-09-22 21:31
    Thanks! There sure is a slug of stuff to read. I sure like your simple explanation.
Sign In or Register to comment.