小编And*_*rea的帖子

如何解决:Ada 95中的“类型转换的参数必须是单个表达式”

我正在Ada95中编写一个简单程序,以检查棋盘布局输入是否有效。我对Ada还是很陌生,我知道我有很多东西要学习。我不断收到的错误消息是:

35:31:类型转换的参数必须是单个表达式

47:07:类型转换的参数必须是单个表达式

47:22:用于数组转换的非法操作数

53:10:类型转换的参数必须是单个表达式

58:10:类型转换的参数必须是单个表达式

61:13:类型转换的参数必须是单个表达式

64:13:类型转换的参数必须是单个表达式

66:13:类型转换的参数必须是单个表达式

68:13:类型转换的参数必须是单个表达式

76:15:在表达式或调用中无效使用子类型标记

我在下面包含了完整的代码,以便在声明中有任何可能导致问题的地方,可供参考。

-- RULES:
-- Only black squares may have pieces on them
-- Black squares start at the bottom left hand corner
-- Total checker count for a color cannot exceed 12
-- A color may not have more than 7 kings

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

procedure Checker_Checker is
  type Checkers_Piece is ("b", "BK", "RK", "BC", "RC"); …
Run Code Online (Sandbox Code Playgroud)

procedure ada

2
推荐指数
1
解决办法
125
查看次数

标签 统计

ada ×1

procedure ×1