Topic
1 reply Latest Post - ‏2013-04-06T06:56:58Z by clogs
haroldBuchman
haroldBuchman
30 Posts
ACCEPTED ANSWER

Pinned topic DataItem - I Would Love To Use It

‏2013-04-05T23:05:32Z |
I found the DataItem Part in the EGL documentation and examples.
However, whenever I try to use it in an ELG RUI Handler or Basic Program, it doesn't pass syntax.
The keyword 'dataitem' is actually recognized, but the red X says 'IWN.SYN.2106.e 6/29 Syntax Error, Delete this token'

Is there an additional library I or something I need to import?
Will this construct compile for a Java runtime target?
I'm missing something really basic.

For example:

package test;
program dataItemTester2 type BasicProgram {}
fred int = 1;
DataItem theDA DECIMAL(9,2)end;
dataitem StateAbbrev String { ValidValues = } end

function main()
end
end
Updated on 2013-04-06T06:56:58Z at 2013-04-06T06:56:58Z by clogs
  • clogs
    clogs
    186 Posts
    ACCEPTED ANSWER

    Re: DataItem - I Would Love To Use It

    ‏2013-04-06T06:56:58Z  in response to haroldBuchman
    Hi Harold,

    Problem is your dataitems are embedded in your progra/end block. Try this (and notice there are no semi-colns after the 'end' of each dataitem.

    package com.test;
     
    program Test type BasicProgram {}    
            fred int = 1;
            myDA theDA = 9.2;
     
            function main()
                    SysLib.writeStdout(myDA);
            end
    end
     
    DataItem theDA DECIMAL(9,2) end
    dataitem StateAbbrev String { ValidValues = ["Test"]} end
    


    Regards,
    Willem
    Updated on 2014-03-25T04:35:05Z at 2014-03-25T04:35:05Z by iron-man