NI Home > Community > NI Discussion Forums

LabWindows/CVI

Reply
Active Participant
Wim S
Posts: 401
0 Kudos

Question about the Documentation Tags for Source Code

Hello,
 
I have a question about CVI's automatic source code documentation. My problem is that is seems like you need to write all documentation for a specific tag on one line. If you don't, a line break will be inserted when the documentation is displayed. Suppose I want to write a large amount of documentation for the function itself, using the HIFN tag. If I don't want linebreaks to be forced in the documentation, I need to write all this documentation on one single line, which kinda messes up my code. If I split the documentation over several HIFN tags, the documentation displayed to the user might look messed up because of all the linebreaks. Is there any escape character I can put at the end of a line, allowing me to split the documentation of several HIFN lines without forcing linebreaks in the documentation?
 
Thanks!
 
Active Participant
LuisG
Posts: 1,968

Re: Question about the Documentation Tags for Source Code

Hi Wim,

There is no special escape character for these tags, but if you don't mind living with an extra compiler warning, and with missing syntax coloring after the first line, you could use the universal backslash as the escape character:

/// HIFN \
line 1 \
line 2 \
line 3

Luis

 

Active Participant
Wim S
Posts: 401
0 Kudos

Re: Question about the Documentation Tags for Source Code

Hello Luis,

thanks for the answer. This works indeed, but it also messes up my code :smileysad:

Member
Korn2die
Posts: 2
0 Kudos

Re: Question about the Documentation Tags for Source Code

Hi,

 

I know this thread is 3 Years old, but someone else may use this tip.

 

I solved the Problem with a HTML Tag. You can justificate the text with following command:

 

/// HIFN <HTML><BODY><p align ="justify">

/// HIFN place

/// HIFN your

/// HIFN text

/// HIFN here.

/// HIFN </p></BODY></HTML>

 

It doesn't matter how much rows you add, the text will be well formatted.

I hope this will help someone =)

 

 

Korn2die

Trusted Enthusiast
Wolfgang
Posts: 2,521
0 Kudos

Re: Question about the Documentation Tags for Source Code

This information is certainly useful. Note, however, that it can also be found in the documentation :smileywink:

 

TagDescription
/// HIFN help text Specifies the help text for the function. Use multiple /// HIFN tags to display help text for the function on separate lines. To separate help text with an empty line, use /// HIFN on a line by itself. You also can use HTML tags, but you must enclose the tags in <HTML><BODY></BODY></HTML> tags.

Example
/// HIFN SampleFunction returns the value of a control.
int SampleFunction (int controlID, ctrlType controlType, char label[], double *value)
{
     SomeAction;
}
Member
Korn2die
Posts: 2
0 Kudos

Re: Question about the Documentation Tags for Source Code

I know, but the issue was that the text have to be written in one line, or the text get fragmented.

 

With the align="justify" command you can beautify the text