Shop OBEX P1 Docs P2 Docs Learn Events
What is the Numbers.spin file on the object library web page? — Parallax Forums

What is the Numbers.spin file on the object library web page?

Eric SmithEric Smith Posts: 6
edited 2006-05-05 21:55 in Propeller 1
The Numbers.spin object seems to be some kind of binary file, rather than Spin source code. I thought maybe it was really a ZIP file, but apparently it isn't. Is it compiled code? If so, is the source available?

Thanks,
Eric

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-05 20:47
    If you select the Propeller Library you can find Numbers.spin -- in its source form.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-05 20:49
    I just looked at it and it is a regular text file when I download it.
    Here's the head of the file I get:
    ''***************************
    ''* Numbers v1.0            *
    ''* (C) 2005 Parallax, Inc. *
    ''***************************
    
    VAR
      long  BCX0, BCX1, BCX2, BCX3  'BCX Workspace
      byte  Symbols[noparse][[/noparse]7]              'Special symbols (7 characters)
      byte  StrBuf[noparse][[/noparse]49]              'Internal String Buffer
    PUB Init 
    ''Initialize to default settings.  Init MUST be called before first object use.
    ''  ┌──────────────────────────────────────────────────┐
    ''  │             DEFAULT SPECIAL SYMBOLS              │
    ''  ├─────┬──────┬─────────────────────────────────────┤
    ''  │ ID  │ Char │ Usage                               │
    ''  ├─────┼──────┼─────────────────────────────────────┤
    ''  │  1  │  ,   │ Comma (digit group separator)       │
    ''  │  2  │  _   │ Underscore (digit group separator)  │
    ''  │  3  │  $   │ Dollar Sign (Hexadecimal indicator) │
    ''  │  4  │  %   │ Percent Sign (Binary indicator)     │
    ''  │ 5-7 │      │ Unused (User definable via Config)  │
    ''  └─────┴──────┴─────────────────────────────────────┘
      Config(@DefaultSymbols)
     
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • Eric SmithEric Smith Posts: 6
    edited 2006-05-05 20:52
    Are you talking about the Propeller Object Library page? That's where I've downloaded it from, and it is NOT source code. It's 85,894 bytes of something, though. Seems a little big for Spin source code.

    http://www.parallax.com/propeller/object.asp

    http://www.parallax.com/dl/docs/prod/prop/Numbers.spin

    Eric
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-05 21:03
    Correct, thats where I got it from, looked at it with notepad, and cut and pasted the excerpt above.

    That is the correct size of the file, I just verified it. It is large because it has alot of defined constants and documentation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10

    Post Edited (Paul Baker) : 5/5/2006 9:10:48 PM GMT
  • Eric SmithEric Smith Posts: 6
    edited 2006-05-05 21:55
    Very strange. I've downloaded it four times over the last several days, using wget. I get the same thing each time, which is a bunch of binary junk. So I just tried downloading it directly in Firefox, and I get the right thing. However, wget worked fine for more than twenty other files I've downloaded from the Propeller web pages (including the object library page), and from the forums.

    I wonder why the Parallax web server would be providing different content for wget vs. Firefox? I've never seen that anywhere else, other than a few sites that explicitly reject all attempts to download using wget.

    Anyhow, now I've got the right file. Thanks!
    Eric
Sign In or Register to comment.