Aspects of Programming Languages

Aspects of Programming Languages - types (variables) •...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Aspects of Programming Basics: Operators: Computers implement software using only a few operations o Arithmetic o Logical Boolean o & bit-wise AND o | bit-wise OR o ^ bit-wise XOR o ~ bit-wise NOT Variables o A named storage location myName—string data type z=a+B z,a,b are three variables, numbers z receives the sum of “a +b” o a few fundamental types of variables (primitives) numbers: Boolean Text o Can combine groups of primitives into groups to create larger composite data
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: types (variables) • Conditionals: o Allow use to make decisions, and take different actions (based on those decisions) • Syntax: o If (a ==b) Z=z*a: /*true body*/ Else Y=a-b; /*false body*/ Code body • Starts with a left brace { • Ends with a right brace } • A code body is affiliated with a o conditional, o loop, o function/procedure Loop: used to perform repetition Example: i=O; while (i<n) { a=a+B; i=i+1; }...
View Full Document

This note was uploaded on 03/21/2012 for the course CSCI 130 taught by Professor Jasonfritts during the Spring '12 term at MO St. Louis.

Page1 / 2

Aspects of Programming Languages - types (variables) •...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online