Code Free World

How do you typeset code elements in normal text?


What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like func(), even if there are actually arguments for the function. I have trouble including the arguments and still feeling like the paragraph is readable.

Any thoughts on best practices for this?

I would simply be a little more careful with the name of my variables and parameters, most people will then be able to guess much more accurately what type of data you want to hold in it.

I usually take that approach, but if I feel like it's going to cause confusion, I'll use ellipses like: myFunction(...)

I guess if I were good, I would use those any time I was omitting parameters from a function in text.