Shop OBEX P1 Docs P2 Docs Learn Events
Andy Please Help! Compiler/Syntax question — Parallax Forums

Andy Please Help! Compiler/Syntax question

bmcnichobmcnicho Posts: 40
edited 2014-02-19 09:54 in Learn with BlocklyProp
I got this e-mail from a dad of one of my students. He might as well be speaking Greek. What is the answer?

Does the compiler have a way to show what the syntax options are for the compiler?

Please salvage my pride so I don't have to admit I have no idea what he's talking about.

Diane

Comments

  • SRLMSRLM Posts: 5,045
    edited 2014-02-17 11:33
    I don't have any idea what he's talking about either. The syntax is part of the language (C), and generally you don't have any options on changing that. If you really wanted to get pedantic you could refer him to a C grammar such as this, but that's not really what he's asking.

    I think what he wants is live syntax checking, which SimpleIDE does not have. You have to run the program to check the syntax.
  • bmcnichobmcnicho Posts: 40
    edited 2014-02-17 12:36
    Thanks for your help!

    Diane
  • edited 2014-02-17 12:54
    Yeah, it's hard to tell what he's aiming at with his question. Autocomplete is a common feature that presents you with a list of available functions and their syntax when you start typing. As SRLM said, SimpleIDE doesn't have that currently.

    For reference, everyone has their favorites. My two favorite C language references are at IBM's site:

    Language
    http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzarg%2Fsc09785202.htm

    Standard Libraries
    http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frtref%2Fsc41560702.htm

    There's also info on the Simple Libraries that gets installed with SimpleIDE. Just click Help and Select Simple Library Reference. If nothing happens due to web browser incompatibility, you can use a file browser to open Libraries Index.html from the ...Documents\SimpleIDE\Learn folder.

    Andy

    P.S. For embedded developers:

    Propeller library info is here:
    https://sites.google.com/site/propellergcc/documentation/libraries

    Pay special attention to propeller.h
    https://sites.google.com/site/propellergcc/documentation/libraries/propeller-h-library
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2014-02-18 10:17
    SRLM wrote: »
    ... You have to run the program to check the syntax.

    For newcomers reading this thread: to check for syntax and other compile errors, you don't have to run as in "download to a Propeller chip," but simply run as in "build."

    Just click the Build Project button -- it is the little hammer icon on the top tool bar. You don't have to have a Propeller chip connected.
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2014-02-19 09:14
    bmcnicho wrote: »
    Does the compiler have a way to show what the syntax options are for the compiler?

    I think maybe what he meant was: what are the command line options that you can put into "Other Compiler Options", and perhaps "Other Linker Options"

    There are hundreds of possible command line options to gcc and ld. Most of them you will never need if you're building programs from SimpleIDE. The official documentation is at:

    http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_3.html (compiler)

    and:

    http://ftp.gnu.org/pub/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html (linker)

    But there are probably other pages on the web that are easier to read and may have better information. Google for "gcc command line options" and/or "ld command line options".

    ===Jac
  • jazzedjazzed Posts: 11,803
    edited 2014-02-19 09:54
    There are hundreds of possible command line options to gcc and ld. Most of them you will never need if you're building programs from SimpleIDE.
    Absolutely true. We have provided check-boxes for the most common options and have added certain options automatically in the build steps for the user based on program needs.
Sign In or Register to comment.