xrpn 2.1 → 2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b24dce24109f4a7222e21c8512f6d94abc5249627b5c5fcb3c445ad3f6fd6d4
4
- data.tar.gz: c1f0dcc7aeb1b15e9f2301305069c8845b02da91fae7a955f39bf29c533835b0
3
+ metadata.gz: e6ace1f064aca783f21398cdb1f2f4f559ed9c81c5f0ec320bbfb1bcb141dba9
4
+ data.tar.gz: 49ba0dbb56fb0d008b137f869aa384d405a178f65a3ae4cef0da13ce1ee417bd
5
5
  SHA512:
6
- metadata.gz: 6f900855140a10644b1a83bfa50de31e74c2ac1468e7fc2284f698187e69538515a19744893b0f4c1d7cb3fe88a9b749628386803be304d72a99538685ecb0ed
7
- data.tar.gz: 25471831a90d05f1138baad38554922c3ef43efe7d7195313d521ed1e29665b459b67dbc94b99fa2d94360665204117684ca532836fbaed76a426d015826ac14
6
+ metadata.gz: 391751c7be85bb1c289813dbc181386ea5e547be63e22ae59991f7713d44bfe034cbed36cd8aedfb131dd19f433cb71fc75449cd6ba4300c4d642d65f4bbbed9
7
+ data.tar.gz: 712a0cf5d4452142836fa7ef503ea56236bbe8bb76f500acceff98778072212d97751d604eb0d8c63d910bab166ef80c5c97a58f872e606067e5e577d51dd8d4
data/bin/xrpn CHANGED
@@ -137,7 +137,15 @@ until @p.pc == @p.prg[@p.pg].length do
137
137
  read_xcmd
138
138
  elsif XRPN.method_defined?(l1.downcase) # Or execute the command with either 1 or 2 parts
139
139
  begin
140
- l2 ? ret = @p.send(l1.downcase, l2) : ret = @p.send(l1.downcase)
140
+ if @p.flg["25"] == true
141
+ begin
142
+ l2 ? ret = @p.send(l1.downcase, l2) : ret = @p.send(l1.downcase)
143
+ rescue
144
+ @p.flg["25"] = false
145
+ end
146
+ else
147
+ l2 ? ret = @p.send(l1.downcase, l2) : ret = @p.send(l1.downcase)
148
+ end
141
149
  rescue ArgumentError
142
150
  puts "Command needs an argument (#{@line})"
143
151
  exit if $exe
data/xcmd/error ADDED
@@ -0,0 +1,8 @@
1
+ class XRPN
2
+ # Clears Flag 25 (error flag)
3
+ def error
4
+ @p.flg["25"] = false
5
+ end
6
+ end
7
+
8
+ # vim:ft=ruby:
data/xcmd/unerror ADDED
@@ -0,0 +1,8 @@
1
+ class XRPN
2
+ # Sets Flag 25 (error flag)
3
+ def error
4
+ @p.flg["25"] = true
5
+ end
6
+ end
7
+
8
+ # vim:ft=ruby:
data/xlib/_xrpn_version CHANGED
@@ -1,5 +1,5 @@
1
1
  def xrpn_version
2
- puts "XRPN version: 2.1"
2
+ puts "XRPN version: 2.3"
3
3
  puts "RubyGem version: " + Gem.latest_spec_for("xrpn").version.to_s
4
4
  end
5
5
 
data/xrpn.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'xrpn'
3
- s.version = '2.1'
3
+ s.version = '2.3'
4
4
  s.licenses = ['Unlicense']
5
5
  s.summary = "XRPN - The eXtended RPN (Reverse Polish Notation) programming language"
6
- s.description = "A full programming language and environment extending the features of the venerable HP calculator programmable calculators. With XRPN you can accomplish a wide range of modern programming tasks as well as running existing HP-41 FOCAL programs directly. XRPN gives modern life to tens of thousands of old HP calculator programs and opens the possibilities to many, many more. New in 2.0: Startup speed 4X. Added command 'cmds'. 2.1: Fixed rounding overflow bug. Added : commands to access underlying Ruby."
6
+ s.description = "A full programming language and environment extending the features of the venerable HP calculator programmable calculators. With XRPN you can accomplish a wide range of modern programming tasks as well as running existing HP-41 FOCAL programs directly. XRPN gives modern life to tens of thousands of old HP calculator programs and opens the possibilities to many, many more. New in 2.0: Startup speed 4X. Added command 'cmds'. 2.1: Fixed rounding overflow bug. Added : commands to access underlying Ruby. 2.2: Added error exception (flag 25) with commands 'error'=CF 25 and 'unerror'=SF 25. 2.3: Better Flag 25 handling."
7
7
 
8
8
  s.authors = ["Geir Isene"]
9
9
  s.email = 'g@isene.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xrpn
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.1'
4
+ version: '2.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -30,7 +30,8 @@ description: 'A full programming language and environment extending the features
30
30
  programs directly. XRPN gives modern life to tens of thousands of old HP calculator
31
31
  programs and opens the possibilities to many, many more. New in 2.0: Startup speed
32
32
  4X. Added command ''cmds''. 2.1: Fixed rounding overflow bug. Added : commands to
33
- access underlying Ruby.'
33
+ access underlying Ruby. 2.2: Added error exception (flag 25) with commands ''error''=CF
34
+ 25 and ''unerror''=SF 25. 2.3: Better Flag 25 handling.'
34
35
  email: g@isene.com
35
36
  executables:
36
37
  - xrpn
@@ -129,6 +130,7 @@ files:
129
130
  - xcmd/end
130
131
  - xcmd/eng
131
132
  - xcmd/enter
133
+ - xcmd/error
132
134
  - xcmd/exp
133
135
  - xcmd/expx1
134
136
  - xcmd/fact
@@ -283,6 +285,7 @@ files:
283
285
  - xcmd/tone
284
286
  - xcmd/tonexy
285
287
  - xcmd/tx
288
+ - xcmd/unerror
286
289
  - xcmd/version
287
290
  - xcmd/view
288
291
  - xcmd/writefile