求助:Unexpected end of file
pascal吧
全部回复
仅看楼主
level 6
芦苇883 楼主
怎么办怎么办{{{(>_<)}}} 不知道错在哪里。
程序代码:
program smileq;
var
input:char;
noquit:boolean;
function tool(v:boolean):boolean;
var
sinput:char;
snoquit:boolean;
begin
snoquit:=true; {Startup}
while snoquit do {Continue TOOL}
begin
write('tool>'); {Input char}
readln(sinput); {Input}
case sinput of
'q':snoquit:=false; {Quit part}
'e':writeln('echo'); {Echo part}
{'t':tool(0); {Tool part}
else writeln('q = quit; e = echo; h = help'); {Help}
end;
end;
end; {End of TOOL}
begin
writeln('Hello, I am SmileQ. How can I help you?'); {Welcome sentence}
noquit:=true; {Startup}
while noquit do {Continue the program}
begin
write('smileq>'); {Input char}
readln(input); {Input}
case input of
'q':noquit:=false; {Quit part}
'e':writeln('echo'); {Echo part}
't':tool(0); {Tool part}
else writeln('q = quit; e = echo; h = help'); {Help}
end;
end;
write('Good day! Press enter to leave... '); {Leaving sentence}
readln;
end.
求大神帮我看看
2016年05月08日 11点05分 1
level 6
芦苇883 楼主
2楼喂熊 [感动]
2016年05月08日 11点05分 2
level 6
芦苇883 楼主
人工顶
2016年05月15日 04点05分 5
level 6
芦苇883 楼主
没有人知道错在哪里吗?
2016年05月15日 04点05分 6
level 8
估计你是导入的文件,里面有格式符号,用二进制编辑器看看里面多了什么
2016年05月19日 13点05分 7
level 8
重启fp。
2016年06月05日 10点06分 8
level 5
保存后关掉重新打开
2016年06月09日 03点06分 10
level 3
function tool(v:boolean):boolean;
var
sinput:char;
snoquit:boolean;
begin
snoquit:=true; {Startup}
while snoquit do {Continue TOOL}
begin
write('tool>'); {Input char}
readln(sinput); {Input}
case sinput of
'q':snoquit:=false; {Quit part}
'e':writeln('echo'); {Echo part}
{'t':tool(0); {Tool part}
else writeln('q = quit; e = echo; h = help'); {Help}
end;
end;
end; {End of TOOL}
这段函数你没有给函数返回值吧
2016年06月13日 10点06分 11
(⊙o⊙)哦 是嘛...
2016年06月17日 10点06分
@芦苇883 最后应该要有一句tool:=sinput;或者是tool:=snoquit;这样纸吧
2016年06月19日 07点06分
@芦苇883 既然定义了它是布尔型的,就要返回布尔型啊
2016年06月19日 07点06分
1