⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 id.1024615.mal

📁 一个内存数据库的源代码这是服务器端还有客户端
💻 MAL
字号:
# Monet Mil to Mal compiler# Copyright (c) 2001-2004, CWI. All rights reserved.#Predefined code segment#The compiler can not guarantee an accurate compilation,#because MIL unlike MAL is a dynamically typed language.#A few guidelines to maximize usefullness.#- make the type of variables explicit, in particular 'nil'#- upon advice of M2m to remap identifiers, change it in your program directly#use the "mil_schema" for additional support routines#	io.print("var b1 := bat(oid,str);");	b1 := bat.new(nil:oid,nil:str);#	io.print("b1.reverse().sort().reverse().print();");	aa_a := bat.reverse(b1);	ba_a := algebra.sort(aa_a);	ca_a := bat.reverse(ba_a);	da_a := io.print(ca_a);#	io.print("b1.access(BAT_WRITE);");	BAT_WRITE:= mil.take("BAT_WRITE");	ea_a := bat.setWriteMode(b1);#	io.print("b1.reverse().sort().reverse().print();");	fa_a := bat.reverse(b1);	ga_a := algebra.sort(fa_a);	ha_a := bat.reverse(ga_a);	ia_a := io.print(ha_a);#	io.print("var b2 := bat(void,str);");	b2 := bat.new(nil:oid,nil:str);#	io.print("b2.seqbase(oid(10));");	ja_a := calc.oid(10);#	io.print("b2.reverse().sort().reverse().print();");	la_a := bat.reverse(b2);	ma_a := algebra.sort(la_a);	na_a := bat.reverse(ma_a);	oa_a := io.print(na_a);#	io.print("b2.access(BAT_WRITE);");	pa_a := bat.setWriteMode(b2);#	io.print("b2.reverse().sort().reverse().print();");	qa_a := bat.reverse(b2);	ra_a := algebra.sort(qa_a);	sa_a := bat.reverse(ra_a);	ta_a := io.print(sa_a);#	io.print("var b3 := mirror(b2);");	b3 := bat.mirror(b2);#	io.print("b3.print();");	ua_a := io.print(b3);#	io.print("var b4 := b3.reverse().join(b2);");	va_a := bat.reverse(b3);	b4 := algebra.join(va_a,b2);#	io.print("b4.print();");	wa_a := io.print(b4);#	io.print("# next line produced an incorrect error \n");#	io.print("# ERROR: CMDsort: returned BAT has unexpected head.\n");	xa_a := bat.reverse(b4);	ya_a := algebra.sort(xa_a);	ab_a := bat.reverse(ya_a);	bb_a := io.print(ab_a);#	io.print("#mini mil example\n");#	io.print("var b2 := bat(void,str);");	b2 := bat.new(nil:oid,nil:str);#	io.print("b2.seqbase(oid(10));");#	io.print("var b3 := mirror(b2);");	b3 := bat.mirror(b2);#	io.print("var b4 := b3.reverse().join(b2);");	eb_a := bat.reverse(b3);	b4 := algebra.join(eb_a,b2);#	io.print("# next line produced an incorrect error \n");#	io.print("# ERROR: CMDsort: returned BAT has unexpected head.\n");	fb_a := bat.reverse(b4);	gb_a := algebra.sort(fb_a);	hb_a := bat.reverse(gb_a);	ib_a := io.print(hb_a);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -