Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for .succ and .pred for Int, Num and Str #494

Closed
p6rt opened this issue Dec 16, 2008 · 4 comments
Closed

Add support for .succ and .pred for Int, Num and Str #494

p6rt opened this issue Dec 16, 2008 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 16, 2008

Migrated from rt.perl.org#61420 (status was 'resolved')

Searchable as RT61420$

@p6rt
Copy link
Author

p6rt commented Dec 16, 2008

From eric.hodges@gmail.com

Index​: src/classes/Int.pir

--- src/classes/Int.pir (revision 33937)
+++ src/classes/Int.pir (working copy)
@​@​ -37,6 +37,24 @​@​
.end

+=item succ and pred
+
+Increment and Decrement Methods
+
+=cut
+
+.sub 'succ' :method
+ $P0 = clone self
+ inc $P0
+ .return ($P0)
+.end
+
+.sub 'pred' :method
+ $P0 = clone self
+ dec $P0
+ .return ($P0)
+.end
+
=item ACCEPTS()

=cut
Index​: src/classes/Str.pir

--- src/classes/Str.pir (revision 33937)
+++ src/classes/Str.pir (working copy)
@​@​ -113,7 +113,25 @​@​
  .return ($P0)
.end

+=item succ and pred

+Increment and Decrement Methods
+
+=cut
+
+.sub 'succ' :method
+ $P0 = clone self
+ inc $P0
+ .return ($P0)
+.end
+
+.sub 'pred' :method
+ $P0 = clone self
+ dec $P0
+ .return ($P0)
+.end
+
+
=item WHICH()

Returns the identify value.
Index​: src/classes/Num.pir

--- src/classes/Num.pir (revision 33937)
+++ src/classes/Num.pir (working copy)
@​@​ -67,6 +67,25 @​@​
.end

+=item succ and pred
+
+Increment and Decrement Methods
+
+=cut
+
+.sub 'succ' :method
+ $P0 = clone self
+ inc $P0
+ .return ($P0)
+.end
+
+.sub 'pred' :method
+ $P0 = clone self
+ dec $P0
+ .return ($P0)
+.end
+
+
=item WHICH()

Returns the identify value.

@p6rt
Copy link
Author

p6rt commented Dec 17, 2008

From @pmichaud

Applied in r34011, thanks!

Pm

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 17, 2008

From @pmichaud

Applied in r34011, thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Dec 17, 2008

@pmichaud - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Dec 17, 2008
@p6rt p6rt added the patch label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant