# https://eli.thegreenplace.net/2010/09/18/python-internals-symbol-tables-part-1
// Declare an external function
extern double bar(double x);
// Define a public function
double foo(int count)
{
double sum = 0.0;
// Sum all the values bar(1) to bar(count)
for (int i = 1; i <= count; i++)
sum += bar((double) i);
return sum;
}
// Symbol Table:
// Symbol name|Type|Scope
// bar|function, double|extern
// x|double|function parameter
// foo|function, double|global
// count|int|function parameter
// sum|double|block local
// i|int|for-loop statement
;; Some programming languages allow the symbol table to be manipulated at run-time, so that symbols can be added at any time.
Languages with Symbol Tables include Python, C, C++, Objective-C, Racket, Cython, Speedie, Tick C
This question asks: Does the compiler use symbol tables internally?
Read more about Symbol Tables on the web: 1.
HTML of this page generated by Features.ts