坚信:勤能补拙
x <- x # yy <- x @ yx <- x @ y
procedure swap(var a,b:longint);begin a:=a + b; b:=a - b; a:=a - b;end;
procedure swap(var a,b:longint);begin a:=a xor b; b:=a xor b; a:=a xor b;end;
var a:word;begin a:=100; a:=not a; writeln(a);end.
#include <stdio.h>int main(){ unsigned short a=100; a = ~a; printf( "%d\n", a ); return 0;}
var a,b:integer;begin a:=$0000; b:=$0001; write(a,' ',b,' '); a:=$FFFE; b:=$FFFF; write(a,' ',b,' '); a:=$7FFF; b:=$8000; writeln(a,' ',b);end.
#include <stdio.h>int main(){ short int a, b; a = 0x0000; b = 0x0001; printf( "%d %d ", a, b ); a = 0xFFFE; b = 0xFFFF; printf( "%d %d ", a, b ); a = 0x7FFF; b = 0x8000; printf( "%d %d\n", a, b ); return 0;}
posted on 2010-11-05 17:04 simplyzhao 阅读(293) 评论(0) 编辑 收藏 引用 所属分类: G_其他