Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Bernhard (4508)

Bernhard
  Bernhard.Schmalhofer@gmx.de
https://www.xing ... hard_Schmalhofer

A freelance software engineer with experience in webapplications, databases and bioinformatics.

A contributor to Parrot and the person behind Pipp.

A physicist who worked with third sound in Helium-III and CCD X-ray detectors.

barney on irc.perl.org
github: http://github.com/bschmalhofer [github.com]
LinkedIn:http://www.linkedin.com/in/bernhardschmalhofer [linkedin.com]
XING: https://www.xing.com/profile/Bernhard_Schmalhofer [xing.com]

Journal of Bernhard (4508)

Friday July 29, 2005
02:38 PM

No unary '+' in 'POSIX bc'

[ #25961 ]

I'm still trying to learn about computer languages, by targeting 'POSIX bc' to Parrot. Currently I'm checking whether I got the precedences of '+', '-', '*', '/' and '%' right. The harder things are still to come: variables and subroutines.

There is a funny thing I noticed about POSIX bc. POSIX bc has no unary '+', thus '+1' on a line by itself is a syntax error.

bernhard@ubuntu:~$ bc -s
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
1
1
-1
-1
+1
(standard_in) 3: syntax error
0
0
quit
bernhard@ubuntu:~$

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.