0% found this document useful (0 votes)
19 views5 pages

Conceptfinal2020 (Sol)

The document discusses various programming languages including Ruby, C89, Python, and others, focusing on equality operators and local variable references in functions. It highlights the differences in equality comparison methods and provides examples of variable scopes in different contexts. The content spans multiple programming paradigms and historical contexts from the 1960s to modern languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Conceptfinal2020 (Sol)

The document discusses various programming languages including Ruby, C89, Python, and others, focusing on equality operators and local variable references in functions. It highlights the differences in equality comparison methods and provides examples of variable scopes in different contexts. The content spans multiple programming paradigms and historical contexts from the 1960s to modern languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

run time error Ruby uses ==for equality relation

operator that uses coercions and


eql?for those that do not

C89

Perl, Python, JavaScript, and Ruby

1960's

In C89, C99, Python, and C++, the control


expression can be arithmetic
a:1 b:2 c:2 d:2

a:1 b:2 c:3 d:3 e:3

a:1 b:2 c:2 d:2

a:1 b:1: c:1


1: local (a, y, and z) from sub1(), x from main() reference only,
not assignment

2: local (a, x, and w) from sub2(), (y and z) from main() reference only,
not assignment

3: local (a, b, and z) from sub3(), (x, w) for reference from sub(2), (y) for
reference from main().

4: local (x, y, and z) from main().

You might also like