|
33 | 33 | #endif |
34 | 34 |
|
35 | 35 | namespace { |
36 | | - const std::string version_short{"6.36"}; |
37 | | - const std::string version_date{"(2025/02/05)"}; |
| 36 | + const std::string version_short{"6.37"}; |
| 37 | + const std::string version_date{"(2025/03/06)"}; |
38 | 38 | const std::string version_string = version_short + " " + version_date; |
39 | 39 |
|
40 | 40 | void output_copyright(); |
@@ -580,42 +580,49 @@ namespace SEAMS { |
580 | 580 | ptr->value.svar = ""; |
581 | 581 | } |
582 | 582 | } |
| 583 | + else if (match_option(option, "legacy_output_format", "L", 6)) { |
| 584 | + symrec *ptr = getsym("_FORMAT"); |
| 585 | + if (ptr != nullptr) { |
| 586 | + ptr->value.svar = "%.10g"; |
| 587 | + } |
| 588 | + } |
583 | 589 |
|
584 | 590 | else if (match_option(option, "help", "h", 3)) { |
585 | 591 | std::cerr |
586 | 592 | << "\nAprepro version " << version() << "\n" |
587 | 593 | << "\nUsage: aprepro [options] [-I path] [-c char] [var=val] [filein] [fileout]\n" |
588 | | - << " --debug or -d: Dump all variables, debug loops/if/endif and keep temporary " |
| 594 | + << " --debug or -d: Dump all variables, debug loops/if/endif and keep temporary " |
589 | 595 | "files\n" |
590 | | - << " --dumpvars or -D: Dump all variables at end of run \n" |
591 | | - << " --dumpvars_json or -J: Dump all variables at end of run in json format\n" |
592 | | - << " --version or -v: Print version number to stderr \n" |
593 | | - << " --immutable or -X: All variables are immutable--cannot be modified\n" |
594 | | - << " --errors_fatal or -f: Exit program with nonzero status if errors are " |
| 596 | + << " --dumpvars or -D: Dump all variables at end of run \n" |
| 597 | + << " --dumpvars_json or -J: Dump all variables at end of run in json format\n" |
| 598 | + << " --version or -v: Print version number to stderr \n" |
| 599 | + << " --immutable or -X: All variables are immutable--cannot be modified\n" |
| 600 | + << " --errors_fatal or -f: Exit program with nonzero status if errors are " |
595 | 601 | "encountered\n" |
596 | | - << " --errors_and_warnings_fatal or -F: Exit program with nonzero status if " |
| 602 | + << " --errors_and_warnings_fatal or -F: Exit program with nonzero status if " |
597 | 603 | "warnings are encountered\n" |
598 | | - << "--require_defined or -R: Treat undefined variable warnings as fatal\n" |
599 | | - << "--one_based_index or -1: Array indexing is one-based (default = zero-based)\n" |
600 | | - << " --interactive or -i: Interactive use, no buffering \n" |
601 | | - << " --include=P or -I=P: Include file or include path \n" |
602 | | - << " : If P is path, then optionally prepended to all include " |
| 604 | + << " --require_defined or -R: Treat undefined variable warnings as fatal\n" |
| 605 | + << " --one_based_index or -1: Array indexing is one-based (default = zero-based)\n" |
| 606 | + << " --interactive or -i: Interactive use, no buffering \n" |
| 607 | + << " --include=P or -I=P: Include file or include path \n" |
| 608 | + << " : If P is path, then optionally prepended to all include " |
603 | 609 | "filenames\n" |
604 | | - << " : If P is file, then processed before processing input file\n" |
605 | | - << " : variables defined in P will be immutable.\n" |
606 | | - << " --exit_on or -e: End when 'Exit|EXIT|exit' entered \n" |
607 | | - << " --help or -h: Print this list \n" |
608 | | - << " --message or -M: Print INFO messages \n" |
609 | | - << " --info=file: Output INFO messages (e.g. DUMP() output) to file.\n" |
610 | | - << " --nowarning or -W: Do not print WARN messages \n" |
611 | | - << " --comment=char or -c=char: Change comment character to 'char' \n" |
612 | | - << " --full_precision -p: Floating point output uses as many digits as needed.\n" |
613 | | - << " --copyright or -C: Print copyright message \n" |
614 | | - << " --keep_history or -k: Keep a history of aprepro substitutions.\n" |
615 | | - << " (not for general interactive use) \n" |
616 | | - << " --quiet or -q: Do not print the header output line \n" |
617 | | - << " var=val: Assign value 'val' to variable 'var' \n" |
618 | | - << " Use var=\\\"sval\\\" for a string variable. 'var' will be " |
| 610 | + << " : If P is file, then processed before processing input file\n" |
| 611 | + << " : variables defined in P will be immutable.\n" |
| 612 | + << " --exit_on or -e: End when 'Exit|EXIT|exit' entered \n" |
| 613 | + << " --help or -h: Print this list \n" |
| 614 | + << " --message or -M: Print INFO messages \n" |
| 615 | + << " --info=file: Output INFO messages (e.g. DUMP() output) to file.\n" |
| 616 | + << " --nowarning or -W: Do not print WARN messages \n" |
| 617 | + << "--comment=char or -c=char: Change comment character to 'char' \n" |
| 618 | + << " --full_precision -p: Floating point output uses as many digits as needed. [default]\n" |
| 619 | + << "--legacy_output_format -L: Floating point output uses the legacy `%.10g` format.\n" |
| 620 | + << " --copyright or -C: Print copyright message \n" |
| 621 | + << " --keep_history or -k: Keep a history of aprepro substitutions.\n" |
| 622 | + << " (not for general interactive use) \n" |
| 623 | + << " --quiet or -q: Do not print the header output line \n" |
| 624 | + << " var=val: Assign value 'val' to variable 'var' \n" |
| 625 | + << " Use var=\\\"sval\\\" for a string variable. 'var' will be " |
619 | 626 | "immutable.\n\n" |
620 | 627 | << "\tUnits Systems: si, cgs, cgs-ev, shock, swap, ft-lbf-s, ft-lbm-s, in-lbf-s\n" |
621 | 628 | << "\tEnter {DUMP()} for list of user-defined variables\n" |
|
0 commit comments