1 / 20
文档名称:

C语言库函数(S类字母) - 2.txt

格式:txt   页数:20
下载后只包含 1 个 TXT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

C语言库函数(S类字母) - 2.txt

上传人:中国课件站 2011/10/27 文件大小:0 KB

下载得到文件列表

C语言库函数(S类字母) - 2.txt

文档介绍

文档介绍:函数名: setjmp
功能: 非局部转移
用法: int setjmp(jmp_buf env);
程序例:
#include <>
#include <>
#include <>
void subroutine(void);
jmp_buf jumper;
int main(void)
{
int value;
value = setjmp(jumper);
if (value != 0)
{
printf("Longjmp with value %d\n", value);
exit(value);
}
printf("About to call subroutine ... \n");
subroutine();
return 0;
}
void subroutine(void)
{
longjmp(jumper,1);
}
函数名: setlinestyle
功能: 设置当前画线宽度和类型
用法: void far setlinestyle(int linestype, unsigned upattern);
程序例:
#include <>
#include <>
#include <>
#include <>
#include <>
/* the names of the line styles supported */
char *lname[] = {
"SOLID_LINE",
"DOTTED_LINE",
"CENTER_LINE",
"DASHED_LINE",
"USERBIT_LINE"
};
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int style, midx, midy, userpat;
char stylestr[40];
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}
midx = getmaxx() / 2;
midy = getmaxy() / 2;
/* a user defined line pattern */
/* binary: "0000000000000001" */
userpat = 1;
for (style=SOLID_LINE; style<=USERBIT_LINE; style++)
{
/* select the line style */
setlinestyle(style, userpat, 1);
/* convert style into a string */
strcpy(stylestr, lname[style]);
/* draw a line */
line(0, 0, midx-10, midy);
/* draw a rectangle */
rectangle(0, 0, getmaxx(), getmaxy());
/* output a message */
outtextxy(midx, midy, stylestr);
/* wait for a key */
getch();
cleardevice();
}
/* clean up */
closegraph();
return 0;
}
函数名: setmem
功能: 存值到存储区
用法: void setmem(void *addr, int len, char value);
程序例:
#include <>
#include <>
#include <>
int mai

最近更新

2025年南通职业大学单招职业倾向性测试题库及.. 41页

2025年厦门兴才职业技术学院单招职业技能考试.. 41页

2025年吉林交通职业技术学院单招职业倾向性考.. 42页

2025年吉林省延边朝鲜族自治州单招职业倾向性.. 39页

2025年唐山科技职业技术学院单招职业适应性测.. 39页

2025年嘉兴职业技术学院单招职业技能测试模拟.. 41页

2025年四川司法警官职业学院单招职业技能测试.. 40页

2025年四川应用技术职业学院单招综合素质考试.. 39页

《女式皮靴(拉链式)帮样板设计指南》团体标.. 5页

《耐洗高弹力牛仔面料》 7页

2025年天府新区航空旅游职业学院单招职业技能.. 40页

2025年天津财经大学珠江学院单招职业适应性测.. 40页

2025年宁夏建设职业技术学院单招职业适应性测.. 41页

2025年宁波卫生职业技术学院单招职业倾向性考.. 43页

2025年安徽广播影视职业技术学院单招职业倾向.. 40页

2025年安徽汽车职业技术学院单招职业适应性测.. 41页

2025年安徽省滁州市单招职业倾向性考试模拟测.. 41页

2025年安徽艺术职业学院单招职业技能考试模拟.. 41页

2025年山东铝业职业学院单招职业倾向性测试题.. 40页

2025年广州卫生职业技术学院单招职业技能测试.. 64页

美团代运营业务委托合同 6页

新概念青少版2A各单元重点归纳 15页

九年级家长会课件PPT下载(初三2班) 25页

年产3000万片硝苯地平缓释片车间设计 40页

DB61∕T 926-2014 火灾高危单位消防安全管理与.. 45页

AQ 7011-2018《高温熔融金属吊运安全规程》 11页

保洁外包单位月度考评表 3页

基于 ABAQUS 的切削残余应力仿真说明书 43页

气动球阀使用说明书 2页