This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

const far when used with structures

I can not seam to get

 const far 
to work with structures, in replace of
 const 
.
Both of the following sections of code compile but only the first one works as expected.
I have used
 const far 
in many other sections of code without problems, is it related to the array?

So does anyone know why this works

    typedef struct test_def 
        {
        char * name;
        char  security;
        char * description;
        } test;

     struct test_def const register_information[] =
        {{"Register 1",'s',"A register description"},
        {"Register 2",'s',"Another register description"}}
        ;
 
    *name = register_information[regnum].name;
    *security = register_information[regnum].security;
    *description = register_information[regnum].description;
    return 0;

but this does not ?

    typedef struct test_def 
        {
        char * name;
        char  security;
        char * description;
        } test;

     struct test_def const far register_information[] =
        {{"Register 1",'s',"A register description"},
        {"Register 2",'s',"Another register description"}}
        ;

    *name = register_information[regnum].name;
    *security = register_information[regnum].security;
    *description = register_information[regnum].description;
    return 0;