DICTIONARY OF DICTIONARY OF ....

Started by David H., February 03, 2020, 09:42:47 AM

Previous topic - Next topic

David H.

Hi,

I wanted to define a DICTIONARY of a DICTIONARY of STRING's...

I noticed that the compiler does not like the syntax but if I use a TYPE its happy with it and the code works as expected

Code (genero) Select


    TYPE mydict DICTIONARY OF STRING
    DEFINE m_dict DICTIONARY OF mydict



Just mentioned this in case this was not the expected behaviour.

Cheers,

David

Reuben B.

Quote from: David H. on February 03, 2020, 09:42:47 AM
Hi,

I wanted to define a DICTIONARY of a DICTIONARY of STRING's...

I noticed that the compiler does not like the syntax but if I use a TYPE its happy with it and the code works as expected

Code (genero) Select


    TYPE mydict DICTIONARY OF STRING
    DEFINE m_dict DICTIONARY OF mydict



Just mentioned this in case this was not the expected behaviour.

Cheers,

David

Expected Behaviour.  It came up at the end of this discussion http://4js.com/fjs_forum/index.php?topic=1247.0 

Same thing also occurs with DYNAMIC ARRAY or any combination of DYNAMIC ARRAY and DICTIONARY.  I think it was felt that using TYPE was the better practise so no urgency attached to any change.

Reuben 
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero