Function names

Mar 27, 2009 17:11

As I was working on some routines & C preprocessor macros for dealing with fixed point numbers , I had the need to convert from one format to another. So, this is what I came up with initially:

b = fixed_10_6_to_10_22(a);

But, it's so long, and typing all those underscores is tedious. So, I think I'll use this instead:

b = f10621022(a);

It's much shorter, and has the same amount of information crammed into it.

Now, I think I'll change

c = fixed_10_6_multiply(a,b)

to

c = f106m(a,b)

It saves disk space, right? Might even make the executable smaller.

Thanks to Ryan for his help.

Note: This is post is sarcastic. f106m is a terrible name for a function, and the other one would win a failing grade in my class. I'm a big proponent of readability of code.

programming, embedded, nerd, c, computer

Previous post Next post
Up