mirror of
https://github.com/louisrubet/rpn
synced 2025-01-01 18:20:06 +01:00
Rationalize syntax strings
This commit is contained in:
parent
4d3b2d1abc
commit
6f9a94b34d
2 changed files with 21 additions and 4 deletions
|
@ -24,14 +24,19 @@ void help()
|
|||
rpn_uname();
|
||||
cout<<endl;
|
||||
|
||||
cout<<"HP28S Reverse Polish Notation language simulator"<<endl;
|
||||
cout<<"syntax: rpn [command]"<<endl;
|
||||
cout<<"with optional command = list of commands"<<endl;
|
||||
// syntax
|
||||
for (int i = 0; syntax[i] != NULL; i++)
|
||||
cout<<syntax[i]<<endl;
|
||||
|
||||
// keywords
|
||||
for(unsigned int i=0; i<sizeof(_keywords)/sizeof(_keywords[0]); i++)
|
||||
if (_keywords[i].comment.size() != 0)
|
||||
cout<<_keywords[i].name<<"\t"<<_keywords[i].comment<<endl;
|
||||
cout<<_keywords[i].name<<"\t"<<_keywords[i].comment<<endl;
|
||||
cout<<endl;
|
||||
|
||||
// different modes
|
||||
cout<<"Current verbosity is "<<g_verbose<<endl;
|
||||
|
||||
cout<<"Current float mode is ";
|
||||
switch(number::s_mode)
|
||||
{
|
||||
|
@ -40,7 +45,9 @@ void help()
|
|||
case number::sci: cout << "'sci'"; break;
|
||||
default: cout << "unknown"; break;
|
||||
}
|
||||
|
||||
cout<<endl<<"Current float precision is "<<number::s_current_precision<<endl;
|
||||
|
||||
cout<<"Current binary mode is ";
|
||||
switch(binary::s_mode)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
// version and soft name
|
||||
static const char version[] = "1.3-beta";
|
||||
static const char uname[] = "rpn v1.3-beta, (c) 2015 <louis@rubet.fr>";
|
||||
|
||||
// syntax
|
||||
static const char* syntax[] = {
|
||||
"Reverse Polish Notation language, based on hewlett-Packard RPL",
|
||||
"Syntax: rpn [command]",
|
||||
"with optional command = list of commands",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char prompt[] = ATTR_BOLD "rpn" ATTR_OFF "> ";
|
||||
|
|
Loading…
Reference in a new issue