摘要:conwin pascal脚本解释器,exe免费版。脚本语言采用object pascal (delphi)语言子集,基本语法与object pascal类似,但存在如下限制:* 不支持class、interface定义,但可以通过嵌入编译方式将类、接口加入脚本* 暂不支持forward函数* 暂不区分unit/program分别,interface/implementation的定义都是公开的,......
摘要:如果用dbchart,假设数据库如下:a b1 22 23 34 2a作为x轴,y作为y轴,显示图形如下43 x / \2 x--x x1 1 2 3 4我想显示成如下图形(a作为y轴,b作为x轴)4 x \3 x / 2 x |1 x 1 2 3 4可是如果单纯用a作为y轴,b作为x轴,显示的结果为4 x | \3 | x | 2 x |1 x 1 2 3 4我个人认为dbchart的line在......
PL0编译器TurboPascal版再现
(********************* pl0 编译程序turbo pascal代码 *********************)
program pl0(fa,fa1,fa2);
(* pl0 compile with code generation *)
label 99;
(* turbo pascal do not support goto between different
blocks so, the goto command in getch are replaced
by procedure exitp !! in another way, label 99 do
not work !! lin wei 2001 *)
const norw=13; (* of reserved words *)
txmax=100; (* length of identifier table *)
nmax=14; (* max number of digits in numbers *)
al=10; (* length of identifiers *)
amax=2047; (* maximum address *)
levmax=3; (* max depth of block nesting *)
cxmax=200; (* size of code array *)
type symbol=(nul,ident,number,plus,minus,times,slash,oddsym,
eql,neq,lss,leq,gtr,geq,lparen,rparen,comma,
semicolon,period,becomes,beginsym,endsym,ifsym,
thensym,whilesym,writesym,readsym,dosym,callsym,
constsym,varsym,procsym);
alfa=packed array[1..al] of char;
objects=(constant,variable,procedur);
(* wirth used the word "procedure"and"object" there, which wont work! *)
symset=set of symbol;
fct=(lit,opr,lod,sto,cal,int,jmp,jpc);
instruction=packed record
f:fct; (* function code *)
l:0..levmax; (* level *)
a:0..amax; (* displacement addr *)
end;
(* lit 0,a load constant a
opr 0,a execute opr a
lod 1,a load variable 1,a
sto 1,a store variable 1,a
cal 1,a call procedure at level 1
int 0,a increment t -register by a
jmp 0,a jump to a
jpc 0,a jump conditional to a *)
var fa:text;
fa1,fa2:text;
listswitch:boolean; (* true set list object code *)
ch:char; (* last char read *)
sym:symbol; (* last symbol read *)
id:alfa; (* last identifier read *)
num:integer; (* last number read *)
cc:integer; (* character count *)
ll:integer; (* line length *)
kk:integer;
cx:integer; (* code allocation index *)
line:array[1..81] of char;
a:alfa;
code:array[0..cxmax] of instruction...
下一页 摘要:procedure tform1.dbgrid1drawcolumncell(sender: tobject; const rect: trect; datacol: integer; column: tcolumn; state: tgriddrawstate);var s:string;begin tdbgrid(sender).defaultdrawcolumncell(rect,datac......