小编Ben*_*enC的帖子

5
推荐指数
0
解决办法
702
查看次数

如何在Ada中的嵌套聚合中分配记录

我试图初始化一个记录变量,它本身包含一个使用聚合的嵌套记录,但似乎无法使语法正确.任何帮助赞赏.

with Step; use Step;

package Pattern is   

   -- ADT
   type Pattern_Type is tagged private;

   -- ADT components
  type Bars_Type is private; 

  -- ADT instance methods
  function Tempo (This: Pattern_Type) return Integer;       
  function Bars (This: Pattern_Type)  return Bars_Type;    
  function Get_Next_Step(This: Pattern_Type ) return Step_Type;   

  -- Static methods
  function Get_Basic_Beat return Pattern_Type;

private

  type Bars_Type is range 0..2;                  
  Number_Of_Steps : constant Natural := 32;

  type Active_Step_Type is mod Number_Of_Steps;   
  type Steps_Type is array( Active_Step_Type ) of Step_Type;


  type Pattern_Type is tagged …
Run Code Online (Sandbox Code Playgroud)

ada

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

标签 统计

ada ×1

build.gradle ×1

intellij-idea ×1

intellij-plugin ×1

java ×1