L4_SymTable

L4_SymTable - What are Symbol Tables The next Data...

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

View Full Document Right Arrow Icon
What are Symbol Tables The next Data Structure that we learn is called a symbol table . Key Value 001 CHAN TAI MAN 002 CHEUNG KA KA 003 YEUNG WING LAM Operations: Look up a value in the table. Enter a value with its associated key. Page 1 of 17
Background image of page 1

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

View Full DocumentRight Arrow Icon
What are Symbol Tables The ‘value’ can in fact be composed of a number of values. Key Value x int, addr 2343248, 4 bytes cp char, addr 32934, 4 bytes st object, addr 458340, 4600 bytes Page 2 of 17
Background image of page 2
What are Symbol Tables The ‘key’ can in fact be anything. Key Value square, red, (3,4) triangle, yellow, (4,5) circle, blue, (7,9) diamond, green, (5,0) Page 3 of 17
Background image of page 3

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

View Full DocumentRight Arrow Icon
Symbol Tables Operations z Enter The value for a key is inserted into the table. (If an old value exists for the same key, then the old value will be replaced by the new value.) e 4 of 17 Key Value Note : Users do not (need to) know the position of the value in the table. enter Pag
Background image of page 4
z Look Up Note : Users do not (need to) know how the value for a particular key is found in the table. Key
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

L4_SymTable - What are Symbol Tables The next Data...

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

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