I am creating a program but facing problem with proper language for comment string in program.

My program performs some operation. This operation typically always generates some data. (meaningful data if operation went as expected or error data if operation didn't go well). Now this program returns these two things to user:

data, True - if operation generates meaningful data

data, False - if operation generates error data

I want a comment string at the start of program which mentions what this program is returning to user, and I am not able to come up with a single word which will define True/False nature of this data.

Things I have on mind for comment string:

"Returns data and True/False based on result of operation" (UGLY)
"Returns data and success nature of operation" (WUT?)
"Returns data and boolean result of operation" (Not good)
"Returns data and ....." (I am not good at this really)
  • 1
    Maybe "Returns data and the success of the operation as a boolean"? Your problem is that a word meaning "True/False" doesn't mean "success indicator". – AndyT Jan 6 '16 at 16:59
  • " Vindicate "is to confirm an agreement only... there may be legal word for it. – Narasimham Jan 6 '16 at 17:03
  • True or false is a success indicator of the operation – MohitC Jan 6 '16 at 17:04
  • Returns data and a completion status value indicating whether the returned data is meaningful. – Jim Jan 6 '16 at 17:04
  • 1
    Comments are supposed to be specific. Looking for a single word to encompass your meaning can lead to ambiguity. Your comment should read: Returns data and Boolean result of operation. If Boolean is true then foo. If it is false then bar. – TsSkTo Jan 6 '16 at 17:36

It returns a Boolean if you want the technical term in the language, or a flag. So:

Returns data and a flag indicating success/failure.


Returns data and a Boolean indicating success/failure.

Try to stick as close as possible to the pre-defined terms within the language, since many programmers do not speak English natively, and Googling for an answer is much easier if the terms are consistent.

If you have a specific language, look for a similar function, and read the documentation. You can also ask on stackoverflow.

|improve this answer|||||

I suggest validity:

The quality of being logically or factually sound; soundness or cogency:

'one might question the validity of our data'

So your comment string could read: "Returns data and its validity"

|improve this answer|||||

I think you want truth value or truth-value, a common expression used in logic.

Or if the words 'true' and 'false' are being used only to communicate the success or failure of the operation, you might just go with success.

|improve this answer|||||
  • +1 for suggesting "success" as the best option. It might not carry the connotation of the boolean, but I doubt a single word exists which is able to. – AndyT Jan 6 '16 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.