Jump to content

Recommended Posts

Posted

Would it, could it, or will it ever be possible to include LABEL definitions in an NGC file?

Its nice to be able to write the definition close to where it is being used.

Posted

Fair enough. Anyway, it's not too difficult open an extra editor window. With the script/macro approach it's easy enough to split the LABEL lines to a separate file for output, anyhow.

Posted

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.

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...