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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...