#61 Allow data directive statements in Rexx files.


Sometimes it is nice to be able to include data
directly within a Rexx program without having to worry
about whether it is quoted properly or conforms to
valid Rexx syntax (such as help information).
Something similar to XML's CDATA tags would work quite

::data foo
whatever I want to put here is fine....
on as many lines as I want!
::::data -- end of data marker....can be anything

The data would be available in the local environment as
an array of lines, and should be scopeable with the
public keyword.


  • LesK

    LesK - 2007-11-09

    Logged In: YES
    Originator: NO

    Allowing a pointer to a file would be nice too!

  • Rick McGuire

    Rick McGuire - 2014-06-29
    • status: open --> accepted
    • assigned_to: Rick McGuire
    • Pending work items: --> none
  • LesK

    LesK - 2014-06-30

    Wouldn't that limit it to being used at the end of a file?
    What if you wanted more than one of them, perhaps within some other
    I've always used the universally usable:

    beginhelp=thisline()+1 /
    Help prose
    thisline: return sigl

    Perhaps not as pretty, but much more flexible.

  • Rick McGuire

    Rick McGuire - 2014-09-25
    • Pending work items: none --> doc+test
    • Milestone: None --> 5.0.0
  • Erich

    Erich - 2015-06-13
    • Pending work items: doc+test --> tests
  • Erich

    Erich - 2015-06-13

    ::RESOURCE documented in revision [r10915].



    Commit: [r10915]

  • Erich

    Erich - 2016-04-27
    • status: accepted --> pending
    • Pending work items: tests --> none
  • Erich

    Erich - 2016-04-27

    Committed tests with revision [r11026]



    Commit: [r11026]

  • LesK

    LesK - 2016-04-28

    What if the help panel data was an example of how to create and use a ::data directive? You'd need to be able to recognize the nesting, or provide some kind of markup that turns directive detection off until the special markup to turn it back on occurs. And, of course, that markup would have to show a nesting level.

  • Erich

    Erich - 2016-04-28

    Les, ::resource will allow nested ::resource directives by specifying different end markers. Here's an example:

    ::resource outer end "end-0"
    ::resource inner end "end-1"

    | edit: trying to circumvent sf formatting issue

    Last edit: Erich 2016-04-28
  • LesK

    LesK - 2016-04-28

    That's clever! Can the end marker start with :: ?

  • Erich

    Erich - 2016-04-28

    The ::resource end delimiter can be an arbitrary string (which may start with "::")
    For details see rexref 5.0 at https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0alpha/ (most topics changed or new in 5.0 are marked with *CHG* resp. *NEW* for easier identification.



Cancel  Add attachments