7
votes
Command line calculator in C
Don't write clever code:
if (printf("%g\n", b(&(const char *){*argv}, 0)) < 0)
You know you’re brilliant, but maybe you’d like to understand what ...
- 807
7
votes
Command line calculator in C
General Observations
I'm going to address coding style here, since the code is almost unreadable.
If you are interested in getting your code reviewed you may want to pay attention to what the ...
- 21.8k
7
votes
Accepted
Basic recursive descent parser in C
Portable?
"I wrote this code with portability in mind," --> Standard C lacks EINVAL.
longjmp(jmp, errno = EINVAL);
...
- 27.6k
4
votes
Accepted
Command line calculator in C
Avoid global variables for this task
The key problem, in this case, is the added difficultly in proving code correctness.
Alternative:
In func(), instead of ...
- 27.6k
1
vote
Breaking a string expression in operator and operands
In Scala strings are sequence of characters; consequently the Iterator methods are available without a previous split.
The super type of both String and ...
- 11
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
parsing × 1320python × 316
java × 176
c++ × 159
c# × 156
performance × 135
strings × 126
c × 120
beginner × 112
javascript × 98
python-3.x × 86
regex × 76
xml × 69
json × 57
csv × 52
haskell × 48
php × 47
math-expression-eval × 43
object-oriented × 42
html × 40
file × 40
algorithm × 37
rust × 36
datetime × 32
ruby × 30