[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] /[CS320 Course Materials] [Text Version] lab/08.html Wed Mar 9 12:34:52 PST 2011
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]

Contents


    CSci 320 Programming Languages Laboratory 8 Expressions

    Here are some programs with some odd expressions. [ 09a.cpp ] [ 09b.cpp ] [ 09c.cpp ] [ 09d.cpp ] Down-load them, compile them (if possible), run them, change them, experiment with them and prepare a page that describes what they taught you.

    HINT: when in doubt look at the BNF! [ Expressions in c.syntax ] and in particular [ Bitwise%20Expressions in c.syntax ] for the last program.

    Python interpreters execute expressions that you type. Try this

     		python
    then input half a dozen expressions including these (From examples above)
     		5 + 6.6 / 2.2 * 0.5
     		1+2*3&4/5|6^7&10
    Does Python use the same, similar, very different rules to C? You can look at [ ../../samples/python.syntax.html#Expressions ] to get some help.

    The new page should have links to the source code of some of the sample programs -- with any changes you made. It should explain what is going on in the programs.

    It should be linked to your home/index page.

    Deadline: End of the laboratory.

    If you finish the 4 programs early: What do you make of [ ../expressions.html ] ?

    Grading: how much did you get done.

    Check the next class

    [ ../09.html ]

End