2

In programming every datum has some type. For example:

1, 2, 3, are of int type

'a', 'b', 'c' are of char type

'5/17/2019' is of Date type

I often see phrases like this one:

A variable of type char

Why is there no article before "type"?

  • 1
    This particular construction is brilliantly covered here on ELU. Briefly, both the indefinite article (a) and preposition (of) can be discarded in some contexts like those above (also note that idiomatically, we usually say Param1 is of type char, not ...of char type). But not in all contexts - of is required I'm writing a function that expects a parameter of type unknown, for example. – FumbleFingers Jun 22 at 16:09
  • ...including the article (as in This parameter must be of a Date type) tends to imply there are multiple "Date type" storage formats - which exact "subtype" the parameter has to be is either unspecified OR irrelevant (because any of those Date subtypes is acceptable for this parameter). – FumbleFingers Jun 22 at 16:15
  • I think the article being omitted, here, is actually "the", not "a". But that linked question answers it. – Len Jul 3 at 0:04
  • @FumbleFingers Thank you, but the linked question doesn't say anything about articles, does it? It says only about omitting "of"... Could you please explain what did you mean? – embedc yesterday
0

I think it is just placing mistake, it should be "a variable of char type" meaning that the variable type (data type) is CHAR

You can see this link as reference http://cis.poly.edu/~mleung/CS1114/s09/ch02/char.htm

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.