logo
  • 教程列表
  • SO官方文檔
  • 屬性影象
    • 使用 Image 屬性列印出 float
    • 使用 Image 屬性列印輸出整數
    • 使用 Image 屬性列印列舉
    • 使用屬性 Image 列印列舉
    • 使用屬性 Image 列印出 Integer
    • 使用屬性 Image 列印 Float
    • 作為逆轉
  1. StackOverflow 文件
  2. ada 教程
  3. 屬性影象
  4. 使用 Image 屬性列印列舉

使用 Image 屬性列印列舉

Created: November-22, 2018

Version = 有 2012 年(TC-1)

with Ada.Text_IO;

procedure Main is
   type Fruit is (Banana, Orange, Pear);
   X : Fruit := Orange;
begin
   Ada.Text_IO.Put_Line (X'Image);
   Ada.Text_IO.Put_Line (Pear'Image);
end Main;

結果

ORANGE
PEAR
  • 使用屬性 Image 列印列舉
  • 使用 Image 屬性列印輸出整數

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明