📄 readme
字号:
Copyright 2001 Free Software Foundation, Inc.This file is part of the GNU MP Library.This program is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the Free SoftwareFoundation; either version 2 of the License, or (at your option) any laterversion.This program is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along withthis program; if not, write to the Free Software Foundation, Inc., 59 TemplePlace - Suite 330, Boston, MA 02111-1307, USA. DEMONSTRATION CALCULATOR PROGRAMThis is a simple program, meant only to show one way to use GMP with yaccand lex to make a calculator. Usage and comments on the implementation canbe found in calc.y.Within a GMP build tree, the generated Makefile can be used to build theprogram, make calc(or on a DOS system, "make calc.exe").Elsewhere, once GMP has been installed, the program can be compiled with forinstance gcc calc.c calclex.c -lgmp -o calcOr if GNU readline is used then gcc calc.c calclex.c calcread.c -lgmp -lreadline -o calc(again, on a DOS system "-o calc.exe").Readline support can be enabled or disabled in calc-config.h. That file iscreated by the GMP ./configure based on the --with-readline option. Thedefault is --with-readline=detect, which means to use readline if available."yes" can be used to force it to be used, or "no" to not use it.The supplied calc.c was generated by GNU bison, but a standard yacc shouldwork too.The supplied calclex.c was generated by GNU flex, but a standard lex shouldwork too. The readline support may or may not work with a standard lex (seecomments with input() in calcread.c). Note also that a standard lex willrequire its library "-ll" on the compile command line. "./configure" setsthis up in the GMP build tree Makefile.----------------Local variables:mode: textfill-column: 76End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -