Executable semantics in C

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue May 3 05:20:42 PDT 2011


On 27/04/2011 22:20, Timon Gehr wrote:
> Quiz: What does the following code compute?
>
> import std.stdio;
> import core.exception;
> void main(){
> 	int a,b;
> 	int[int] aa;
> 	scanf("%d %d",&a,&b);
> 	try{aa[a]=aa[b];printf("Y\n");}catch(RangeError){printf("N\n");}
> }

What was your point here? Is there even any way an associative array 
throws a RangeError?


-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list