上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 49 下一页
摘要: #include <stdio.h>void main(void) { enum { Monday, Tuesday, Wednesday, Thursday, Friday } day; for (day = Monday; day <= Friday; day++) if (day == Monday) printf("No fun---meetings all day Monday\n");... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(133) 评论(0) 推荐(0)
摘要: #include <conio.h>void main(void) { int i, j; window(1, 1, 40, 12); for (i = 0; i < 15; i++) { for (j = 0; j < 50; j++) cprintf("%d", j); cprintf("\r\n"); } }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(88) 评论(0) 推荐(0)
摘要: #include <stdio.h>void main(void) { char *workdays[] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "" }; char **work_day; work_day = workdays; while (*work_day) printf("%s\n", *work_day+... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(136) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <dos.h>#include <string.h>// Note: If you want to use XMS function 0xB, this simple // xms_access routine only works for tiny, small, or medium // models where the value of ... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(152) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <string.h>void main (void) { char line[255]; // Line of text read while (fgets(line, sizeof(line), stdin)) fputs(strupr(line), stdout); }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:29 XE2011 阅读(115) 评论(0) 推荐(0)
摘要: #include <stdio.h>Main () { printf ("This program does not compile."); }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:29 XE2011 阅读(102) 评论(0) 推荐(0)
摘要: #include <stdio.h>void hello_world(void) { printf("Hello, world!\n"); }void main(void) { hello_world(); }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:29 XE2011 阅读(143) 评论(0) 推荐(0)
摘要: procedure TForm1.Button1Click(Sender: TObject);beginSendMessage(ComboBox1.Handle, CB_SHOWDROPDOWN, 1,0);end;通过 Wiz 发布 阅读全文
posted @ 2012-06-03 17:56 XE2011 阅读(255) 评论(0) 推荐(0)
摘要: //WM_PAINT带背景的窗体private{ Private declarations }Bitmap:TBitmap;procedure WMPaint(var msg:TWMPAINT);Message WM_PAINT;procedure TForm1.WMPaint(var msg:TWMPAINT);begininherited;StretchBlt(canvas.Handle,0,... 阅读全文
posted @ 2012-06-03 17:56 XE2011 阅读(481) 评论(0) 推荐(0)
摘要: //sendmessage WM_PAINT带背景的窗体private{ Private declarations }Bitmap:TBitmap;procedure WMPaint(var msg:TWMPAINT);Message WM_PAINT;procedure TForm1.WMPaint(var msg:TWMPAINT);begininherited;StretchBlt(canv... 阅读全文
posted @ 2012-06-03 17:56 XE2011 阅读(222) 评论(0) 推荐(0)
摘要: //TMemo组件的光标定位privateprocedure MemoRow;{ Private declarations }varForm1: TForm1;procedure TForm1.MemoRow;varLpos,Cpos,LineLength:Integer;beginLpos := SendMessage(Memo1.Handle,em_linefromchar,Memo1.Sel... 阅读全文
posted @ 2012-06-03 17:56 XE2011 阅读(430) 评论(0) 推荐(0)
摘要: http://www.websnap123.com/http://delphi.about.com/http://www.2ccc.com/http://www.delphifans.com/http://www.tommstudio.com/http://www.xuedelphi.cn/通过 Wiz 发布 阅读全文
posted @ 2012-06-03 17:55 XE2011 阅读(167) 评论(0) 推荐(0)
摘要: //With简化代码语句{With语句是一种用于简化代码的语句。如你要访问一个记录类型变量(或一个对象),用With语句就不必每次重复变量的名字with 对象名 dobegin对象名属性 := 属性值;end;}//例1with Button1 dobegincaption := 'Btn';width := 100;end;//例2with edit1 dobegintext := 'Hello... 阅读全文
posted @ 2012-06-03 17:55 XE2011 阅读(106) 评论(0) 推荐(0)
摘要: //简单语句和复合语句简单语句Pascal 简单语句中不包含任何别的语句,赋值语句和过程调用即是简单语句的例子。简单语句用分号隔开,如下所示:X := Y + Z; // assignmentRandomize; // procedure call复合语句用begin 和end 将简单语句括起来即组成复合语句,复合语句用法与普通的Pascal 语句相同,见下例:beginA := B;C := A... 阅读全文
posted @ 2012-06-03 17:55 XE2011 阅读(231) 评论(0) 推荐(0)
摘要: //while循环语句{while True dobegin...end;}procedure TForm1.Button1Click(Sender: TObject);varI: Integer;beginI := 0;while I > 100 dobeginI := I + Random (100);Listbox1.Items.Add ('Random Number: ' + IntToS... 阅读全文
posted @ 2012-06-03 17:55 XE2011 阅读(107) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 49 下一页