Duggle Posted April 18, 2013 Report Share Posted April 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 18, 2013 Report Share Posted April 18, 2013 No, too difficult due to various reasons. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Duggle Posted April 18, 2013 Author Report Share Posted April 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 18, 2013 Report Share Posted April 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
Duggle Posted April 18, 2013 Author Report Share Posted April 18, 2013 Thanks for the hint, TK! (I'll continue discussion in the other thread) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.