Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 628
saint_groceon Avatar asked Aug 06 '08 18:08

saint_groceon


People also ask

How do you code a text?

How do you text a short code number? Texting a short code is simple and just like texting other phone numbers. The only difference is that the number is shorter. Simply create a new text message, type the short code where you'd normally put the recipient's number, type your message and hit send.

What is text formatting code?

The TEXT function lets you change the way a number appears by applying formatting to it with format codes. It's useful in situations where you want to display numbers in a more readable format, or you want to combine numbers with text or symbols.

Which elements are used to make a portion of text look like code when it is presented in the browser?

The <code> tag is used to define a piece of computer code. The content inside is displayed in the browser's default monospace font.


2 Answers

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.

like image 112
MojoFilter Avatar answered Oct 05 '22 10:10

MojoFilter


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.

like image 20
Teifion Avatar answered Oct 05 '22 08:10

Teifion