出错部分如下:
        case QueryRmStut.FieldByName('rm_stus').AsString do
          'V':BoxColor := clEmpty;
          'O':BoxColor := clSelled;
          'B':BoxColor := clReserve;
        end;提示错误:
[Error] RoomMap.pas(109): Ordinal type required
[Error] RoomMap.pas(110): Incompatible types: 'Integer' and 'Char'应该怎么解决?

解决方案 »

  1.   

    很明显的错误提示
    自己查字典翻译一下,
    [Error] RoomMap.pas(109): Ordinal type required
    [Error] RoomMap.pas(110): Incompatible types: 'Integer' and 'Char'
      

  2.   

    这还不简单就是类型不对呀。CASE不能这么用。
    Error] RoomMap.pas(110): Incompatible types: 'Integer' and 'Char'
    这句已经说的很明白。
    不要被英文提示给吓着了。
      

  3.   

    Case只能用于有序类型,比如说整型
      

  4.   

    是啊,case of 中的变量类型错啦,好像只支持Integer和Char类型的,这是PASCAL语法规则
      

  5.   

    我自然知道是类型不对啊,我想问的是能不能把STRING转换成CHAR或者根本不能这么实现,如果不能这么实现是用IF还是用其它什么方法?