[C语言] 关于程序子模块的问题!
/**********************修改用户姓名***************************/
void mofname(struct allstudentinfo *p_student)
{
char ch;
char *temp;
char *newtemp;
int count;
int i;
system("cls");
count=datfile(p_student); //处理文件
if(!count)
{
printf("读取数据失败,请确认已成功录入或文件数据是否损害!");
getch();
return ; //第1个 }
newtemp=(char *)malloc(20*sizeof(char)); //分配内存
temp= (char *)malloc(20*sizeof(char)); //分配内存
printf("请输入您要修改的学生姓名:");
while(gets(temp)!=NULL&&temp[0]!='\0')
{
for(i=0;i<count;i++)
{
if(strcmp(temp,p_student[i].student.name))
{
continue;
}
else
{
printf("请您输入该学生的新姓名:");
gets(newtemp);
system("cls");
printf("\a\n\n\n\n\t\t\t确定要把姓名为%s的学生修改为%s码?(y/n)",temp,newtemp);
ch=getch();
if(ch=='y'||ch=='Y')
{
strcpy(p_student[i].student.name,newtemp); //修改姓名
infofile=fopen(filename,"w+b"); //重新写入文件
for(i=0;i<count;i++)
{
if(fwrite(&p_student[i].student,sizeof(struct studentinfo),1,infofile)==1)
continue;
else
{
fclose(infofile);
printf("修改失败,返回重新操作.....");
getch();
free(temp);
free(newtemp);
system("cls");
return ; //第2个 }
}
fclose(infofile);
system("cls");
printf("\n\n\n\n\t\t\t已成功把%s修改为%s返回!",temp,newtemp);
getch();
free(temp);
free(newtemp);
system("cls");
return ; //第3个 }
}
}
printf("找不到%s的个人信息,返回重新操作!",temp);
free(temp);
getch();
system("cls");
return ; //第4个
}
printf("\n\n\n\n\t\t\t输入有误,请返回重新操作!");
getch();
free(temp);
free(newtemp);
system("cls");
return ; //第5个}
程序中第1,2,3,4,5个return 语句各代表什么意思?