小编Mol*_*ten的帖子

"无法在过程调用中使用函数"编译器错误

ADA河内的递归塔计划.

到目前为止,我认为我的大部分内容已经失效,我的问题在于我的解决功能.我想我的算法很好,但我不知道如何实现它进入的功能,所有的例子,我看到用这个使用内部本身的功能,如: 实例

我的错误是:

hanoi.adb:23:09: cannot use function "solve" in a procedure call
hanoi.adb:27:09: cannot use function "solve" in a procedure call
hanoi.adb:59:15: missing ")"
Run Code Online (Sandbox Code Playgroud)

到目前为止,这是我的代码.

with ada.text_io, ada.command_line;
use ada.text_io, ada.command_line;


procedure hanoi is

Argument_Error : EXCEPTION;
max_disks, min_disks : integer := 3;
moves : integer := 0;


verbose_bool : boolean;

function solve (N: in integer; from, to, using: in character) return integer is
begin


if N = 1 then
    if verbose_bool = true then
    put("Move disk " & …
Run Code Online (Sandbox Code Playgroud)

procedure function ada

0
推荐指数
1
解决办法
3666
查看次数

标签 统计

ada ×1

function ×1

procedure ×1