Mapa mental
4. Common Facilities of Programming Languages

Conteúdo do mapa
4. Common Facilities of Programming Languages
output data
- screen- Text, graphs, Graphics
- Printer- same as screens, need to say which line is going to be printed first and the page size, Printer.print "text"
- File- fixed length, delimited- seperated by character
operators
- arithmetic operators
- '+'- add, '-' - subtract, '*'- multiply, '/'- divide, '^' exponentiation (power..)
- C#: 'MOD' - finds the remainder, 'DIV' - divides two numbers ignores remainder
- relational operators
- pseudo code '='-equals, '<'-less than, '<='-less than or equal to, '>'-more than, '>='-more than or equal to,'<>'-not equal to
- C#- '==' equal, '!=' not equal to
- boolean operators
- and-assigns values as false unless both are true, pseudo 'AND', C#- '&'
- or- assigns values as true unless both are false pseudo 'OR', C#- '||'
- not-only one value, just assigns the opposite to the imputed value, pseudo 'NOT', C#- '!'
- arithmetic operators
String manipulation
- LOCATE(str1,str2)- finds the start position of str1 in str2
- LEFT(str,n)- returns the first n characters of str, can do it to find the last n characters if RIGHT is used instead of LEFT
- MID(str,m,n)- returns n number of characters in str starting at the m character
- LENGTH(str)- returns number of characters in str
- each character is stored a binary digits, ASCII- 7 binary digits and 8th parity, ANSI- used by most modern computers- uses 8 bits- more characters stored- not only latin script
- ASCII(ch)- changes 'ch' into its equivalent ASCII equivalent, CHAR(n)- changes teh value n in ASCII into its character equivalent
- Concatenation- '+' or '&' to join two strings together
using operators
- all operators are done from left to right unless there are brackets
- arithmetic: 5+6-3=11-3=8 Logical:TRUE AND NOT FALSE OR TRUE =>TRUE AND TRUE OR TRUE =>TRUE OR TRUE =>TRUE
- example: a=3 b=4........ (5 – a) * (b + 1) > (a * b – 6)=> 2*5 > 12-6 => 10 >6=> TRUE
comparing strings
- It changes the character into the ASCII code equivalent
- order of characters: Numbers, Uppercase, lowercase
- Numbers stored as strings: the computer looks at first value on the left and then the right, e.g. comparing 2 and 17- 1 is smaller than 2 so 17<2
input and validate data
- Validation- checking against rules already defined by computer- sensible data
- Verification- checks data against the original
- Format check:
assignment statements
- it takes the form of 'variable = expression'
- the right side is looked at the first before the left side so that it assigns the left side to the night side
Imagens e arquivos do mapa
Informações
- Descrição
- A levels Computing Mapa Mental sobre 4. Common Facilities of Programming Languages, criado por deepi1k73 em 05-04-2014.
- Criado por
- deepi1k73
- Visualizações
- 19
- Tags
- Avaliação