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

📄 validate.frm

📁 CForms, by Lars Berntzon (Stockholm, Sweden), is a tool for building interactive forms-driven applic
💻 FRM
字号:
/* * Test application for CForms. * @(#) validate.frm,v 1.3 1993/07/21 01:26:14 lasse Exp */Viewport view {    Pos 0,0;    Size 80, 23;}Event Key DOWN  { fld_move(fld_down(NULL));  }Event Key UP    { fld_move(fld_up(NULL));    }Event Key ESC   { pic_leave(); }Picture Validate Viewport View{    Literal Center, 1, "Test of a validation EXIT  event";    Literal +0, 2,     "--------------------------------";	    Literal Center, Max, "(Press ESC to exit)";    Field Date {	Pos 35, 8;	Type Char(8);	LValue "Enter year of birth (yy-mm-dd): ";	Event Exit {	    int a, b, c;	    char buf[50];	    if (sscanf(fld_get(NULL), "%2d-%2d-%2d", &a, &b, &c) != 3) {		message("Illegal format");		fld_move(NULL);	    }	    else	    {		sprintf(buf, "%02d-%02d-%02d", a, b, c);		fld_set(NULL, buf);	    }	}    }    Field Sex {	Pos +0, +1;	Type Char(8);	LValue "Male/Female: ";	Uppercase;	Event Exit {	    if (strequ(fld_get_trimmed(NULL), "male") != 0 &&	        strequ(fld_get_trimmed(NULL), "female") != 0)	    {		message("Must be male or female (%s)", fld_get_trimmed(NULL));		fld_set(NULL, "");		fld_move(NULL);	    }	}    }}

⌨️ 快捷键说明

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