This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void | |
f(int * p) | |
{ | |
*p = 2; | |
} | |
int | |
main(int argc, char * argv[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby1.9.1 -Ku | |
# -*- mode: ruby; coding: utf-8-unix -*- | |
class Conditional | |
class Else | |
def initialize(p,v) | |
@p = p | |
@v = v | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby1.9.1 -Ku | |
# -*- mode: ruby; coding: utf-8-unix -*- | |
class Foo | |
def if(p,t,f) | |
if p.call then | |
t.call | |
else | |
f.call | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colinux> ruby local.rb | |
foo(true): | |
a is not defined. | |
a is defined. | |
a = 1 | |
foo(false): | |
a is not defined. | |
a is defined. | |
a = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int | |
main( ) | |
{ | |
int c; | |
int newl = 0; | |
while((c = getchar( )) != EOF) { | |
if (c == '\r' || c == '\n') { | |
newl = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load "foo.rb" | |
puts a # Error! | |
NewerOlder