| Path: | lib/rapfp/Test01.rb |
| Last Update: | Sun Apr 29 12:51:45 -0500 2007 |
###
File: Test01.rb
Subject: Class for built in floating point tracking error.
Author: Dennis J. Darland
Date: March 30, 2007
Copyright (C) 2007 Dennis J. Darland
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# File lib/rapfp/Test01.rb, line 181
181: def get_input(label,c_flg)
182:
183: if c_flg != "y" then
184: puts "enter #{label}:"
185: puts str = gets.chomp
186: return ap_in(str)
187: else
188: puts "enter #{label} real component:"
189: puts str = gets.chomp
190: ap_in(str)
191: puts "enter #{label} imaginary component:"
192: puts str_c = gets.chomp
193: ap_in(str_c)
194: return Apc.new(ap_in(str),ap_in(str_c))
195: end
196:
197: end