Skip to content

Compiler under X4 got [dcc32 Error] Debug.pas(66): E1012 Constant expression violates subrange bounds #8

@edwinyzh

Description

@edwinyzh

Created an empty project, added SimpleQueue to the uses clause, and the following code:

const
...
  ANSICOLORS: array of cardinal = [
    $000000,//0
    $800000,//1
    $008000,//2
    $808000,//3
    $000080,//4
    $800080,//5
    $008080,//6
    $D0D0D0,//7
    $3F3F3F,//8
    $FF0000,//9
    $00FF00,//A
    $FFFF00,//B
    $0000FF,//C
    $FF00FF,//D
    $00FFFF,//E
    $FFFFFF];//F

will produce the following error:
[dcc32 Error] Debug.pas(66): E1012 Constant expression violates subrange bounds

Any hints?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions