Jump to content

LABELs in NGC?


Duggle

Recommended Posts

Related to this topic: 

 

Here a hint: with following perl script:

while( <STDIN> ) {
  if( /^\s*#\s*NGL:\s*(.*)/ ) {
    print "$1\n";
  }
}

 

 

you could simply *extract* NGL commands from a .NGC file.

 

Example:

# this is a .NGC file

# we've some EVENT definitions here
EVENT_xxx ...

# and following commands should go into the .NGL file:
# NGL:   COND_LABEL octave
# NGL:   COND <28  "128'"
# NGL:   COND <40  " 64'"
# NGL:   COND <52  " 32'"
# NGL:   COND <64  " 16'"
# NGL:   COND <76  "  8'"
# NGL:   COND <88  "  4'"
# NGL:   COND <100 "  2'"
# NGL:   COND <112 "  1'"
# NGL:   COND <124 "1/2'"
# NGL:   COND_ELSE "???'"

 

call:

perl my_ngl_filter.pl < test.ngc > test.ngl

 

and you are done! :smile:

 

->

 

COND_LABEL octave
COND <28  "128'"
COND <40  " 64'"
COND <52  " 32'"
COND <64  " 16'"
COND <76  "  8'"
COND <88  "  4'"
COND <100 "  2'"
COND <112 "  1'"
COND <124 "1/2'"
COND_ELSE "???'" 

 

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...