...could be on the same line [as?] main


Traditional Chinese
Hi, everyone,

This sentence as follows is from the book "C++ Primer":

"For example, the curly brace that denotes the beginning of the body of main could be on the same line as main."

int main() {} ;
The word "as", I don't know what does it mean. I think that it maybe mean "with" . But, I do not find about meaning of "with" in the "as" explanation from the Longman Dictionary. ( as | meaning of as in Longman Dictionary of Contemporary English | LDOCE )
Last edited:
  • owlman5

    Senior Member
    "With" is a reasonable substitute for "as" in that sentence, VEF. "As" is a word that I find very hard to explain. It has many meanings, and our dictionary lists about fifty of them. :rolleyes: But if "X can be on the same line as Y", then both X and Y can be on the same line.


    Senior Member
    English - British
    'As' in this context is an expression of comparison.
    When we compare the curly brace with main, we can say they are on the same line.
    < Previous | Next >