Shop OBEX P1 Docs P2 Docs Learn Events
Trouble With Syntax — Parallax Forums

Trouble With Syntax

Tony 4dTony 4d Posts: 45
edited 2015-01-14 15:52 in Robotics
Ok My Activity Bot works great, but how does one remember all the Syntax in "C" programming? Having a real hard time with it.

Comments

  • kwinnkwinn Posts: 8,697
    edited 2015-01-13 15:47
    Tony 4d wrote: »
    Ok My Activity Bot works great, but how does one remember all the Syntax in "C" programming? Having a real hard time it.

    Same 3 things as for any other language. Practice, Practice, Practice. Sticking up some notes might help a little also.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-13 22:00
    Having some example code handy is also useful. I often end up copying and pasting code from an earlier program in order to get the syntax correct.
  • Tony 4dTony 4d Posts: 45
    edited 2015-01-14 04:21
    Thanks guys. I guess practice is the best thing. Really like this little bot. I'll keep working at it. Does parallax publish any kind of reference material showing the syntax for all commands?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-14 06:41
    Tony 4d wrote: »
    Thanks guys. I guess practice is the best thing. Really like this little bot. I'll keep working at it. Does parallax publish any kind of reference material showing the syntax for all commands?

    I don't think there's a hard copy of the commands yet. The C material is still relatively new.
  • zappmanzappman Posts: 418
    edited 2015-01-14 09:11
    Tony 4d wrote: »
    Thanks guys. I guess practice is the best thing. Really like this little bot. I'll keep working at it. Does parallax publish any kind of reference material showing the syntax for all commands?

    For the SimpleIDE libraries, if you go to this page http://learn.parallax.com/C/about-simpleide-windows-projects-tabs-and-files it says:
    Find and Use Precompiled Libraries

    Need to go shopping for libraries that support devices? In SimpleIDE, Click Help and select Simple Library Reference. When you have found a Simple Library you want to use, simply #include that library in your program, and SimpleIDE takes care of the rest. For example, if the ping library has the functions you need to incorporate a Ping))) sensor into your project, add #include “ping.h” to your project. Your program can then call any function in the ping library.


    In SimpleIDE, When I Click "Help" and select "Simple Library Reference" my computer opens Internet Explorer.

    Internet Explorer displays the "Simple Libraries Folder Index" page, and a list of the SimplelDE Libraries are shown.

    When I click on a library, Internet Explorer opens a page describing the syntax of all the functions in the selected library.

    Information on the PropellerGCC Libraries can be found at: https://sites.google.com/site/propellergcc/documentation/libraries

    I hope this helps.
  • DomanikDomanik Posts: 233
    edited 2015-01-14 10:20
    When you installed the simpleIDE this file was created on your hard drive:

    C:\..\My Documents\SimpleIDE\Learn\Simple Libraries\Utility\libsimpletools\Documentation simpletools Library.html

    I have a shortcut in my browser that takes me to it. It has many of the Parallax commands with descriptions. Otherwise,
    I google or study the C samples in the "Simple Libraries" and try to accumulate my own knowledge base of C functions.
    The other Parallax C code libraries have their folders with examples too. Good spelunking fun.
  • ercoerco Posts: 20,255
    edited 2015-01-14 10:57
    Duane Degn wrote: »
    Having some example code handy is also useful. I often end up copying and pasting code from an earlier program in order to get the syntax correct.

    +1. I constantly jump back & forth between various micros, and I have made a starter template program for each using proper syntax with all necessary directives and my most often-used commands and routines roughed out. Quick & easy to cut, copy and paste what I need.
  • Tony 4dTony 4d Posts: 45
    edited 2015-01-14 15:52
    Ok, thanks everyone. This really is fun stuff!
Sign In or Register to comment.