Click here to Skip to main content
15,898,538 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Time for a new programming language paradigm Pin
rjmoses21-May-14 5:30
professionalrjmoses21-May-14 5:30 
GeneralRe: Time for a new programming language paradigm Pin
BobJanova21-May-14 5:42
BobJanova21-May-14 5:42 
GeneralRe: Time for a new programming language paradigm Pin
rjmoses21-May-14 6:03
professionalrjmoses21-May-14 6:03 
GeneralRe: Time for a new programming language paradigm Pin
PIEBALDconsult21-May-14 7:22
mvePIEBALDconsult21-May-14 7:22 
GeneralRe: Time for a new programming language paradigm Pin
cosmogon22-May-14 2:34
cosmogon22-May-14 2:34 
GeneralRe: Time for a new programming language paradigm Pin
Klaus-Werner Konrad22-May-14 2:48
Klaus-Werner Konrad22-May-14 2:48 
GeneralRe: Time for a new programming language paradigm Pin
Klaus-Werner Konrad22-May-14 2:43
Klaus-Werner Konrad22-May-14 2:43 
GeneralRe: Time for a new programming language paradigm Pin
rjmoses22-May-14 6:46
professionalrjmoses22-May-14 6:46 
Thanks!

Here's a set of C macros I found real useful that's along the same lines. I tripped them across 20 years ago when I had a programmer working for me that couldn't keep his braces balanced.

I known I will take heat about these macros from certain types of people on this thread, but, remember, this is a problem some of us have been wrestling with since Day 1.

So, for the purists in the group, be thankful for all your experience, but remember back to your early days and, if your were writing bug-free programs back then, you're welcome to comment.

/* (e) is any valid C expression */

/* Uppercase is necessary because of the cursive processing of statements like "else" by the C pre-processor */

/* IF-THEN-ELSE-ELSEIF */
#define IF(e) { if (e)
#define THEN {
#define ELSE_IF(e) } else if (e) {
#define ELSE } else {
#define END_IF ;}}

#define DO_N_TIMES(e) { int __Iii; for (__Iii = 0; __Iii < (e); __Iii++) {
#define END_DO ;}}

#define DO_UNTIL(e) { for (; !(e); ) {
#define END_UNTIL ;}} // END_DO will work also

#define DO_WHILE(e) { while (e) {
#define END_WHILE ;}} // END_DO will work also

#define FOR(e) { for (e) {
#define END_FOR ;}}

#define CASE(e) { switch (e) {
#define CASE_OF(e) case e: {
#define DEFCASE default: {
#define DEFAULT default: {
#define END_COF } break;
#define END_CASE }}

#define BEGIN {
#define END }

#define AND &&
#define OR ||
#define NOT !
#define EQ ==
#define NE !=
#define LT <
#define GT >
#define LE <=
#define GE >=

#define BAND &
#define BOR |
#define BXOR ^
#define BNOT ~
#define LSHF <<
#define RSHF >>

#define INC ++
#define DEC --
#define MOD %
#define ADDR(e) &(e)
#define PTR(e) *(e)

#define BOOLEAN unsigned char
#define BYTE unsigned char
#define REAL double
#define INTEGER int

#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
GeneralRe: Time for a new programming language paradigm Pin
Luca Zenari22-May-14 4:13
Luca Zenari22-May-14 4:13 
GeneralRe: Time for a new programming language paradigm Pin
Member 1083471422-May-14 5:49
Member 1083471422-May-14 5:49 
GeneralRe: Time for a new programming language paradigm Pin
Freak3023-May-14 2:40
Freak3023-May-14 2:40 
GeneralRe: Time for a new programming language paradigm Pin
Steven121822-May-14 7:03
professionalSteven121822-May-14 7:03 
GeneralRe: Time for a new programming language paradigm Pin
Steven121822-May-14 7:05
professionalSteven121822-May-14 7:05 
GeneralRe: Time for a new programming language paradigm Pin
Fred McGalliard22-May-14 12:07
Fred McGalliard22-May-14 12:07 
GeneralI was a TA in college PinPopular
Ennis Ray Lynch, Jr.21-May-14 5:46
Ennis Ray Lynch, Jr.21-May-14 5:46 
GeneralRe: I was a TA in college Pin
rjmoses21-May-14 6:20
professionalrjmoses21-May-14 6:20 
GeneralRe: I was a TA in college Pin
BobJanova21-May-14 6:52
BobJanova21-May-14 6:52 
GeneralRe: I was a TA in college Pin
snorkie21-May-14 9:25
professionalsnorkie21-May-14 9:25 
GeneralRe: I was a TA in college Pin
Stefan_Lang21-May-14 21:48
Stefan_Lang21-May-14 21:48 
GeneralRe: Time for a new programming language paradigm Pin
Eddy Vluggen21-May-14 5:50
professionalEddy Vluggen21-May-14 5:50 
GeneralRe: Time for a new programming language paradigm Pin
rjmoses21-May-14 6:27
professionalrjmoses21-May-14 6:27 
GeneralRe: Time for a new programming language paradigm Pin
Eddy Vluggen22-May-14 9:29
professionalEddy Vluggen22-May-14 9:29 
GeneralRe: Time for a new programming language paradigm Pin
PIEBALDconsult21-May-14 9:32
mvePIEBALDconsult21-May-14 9:32 
GeneralRe: Time for a new programming language paradigm Pin
kalberts21-May-14 22:00
kalberts21-May-14 22:00 
GeneralRe: Time for a new programming language paradigm Pin
kalberts21-May-14 22:31
kalberts21-May-14 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   415 votes