At the following URL: https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsICacheVisitor is the following code chunk:
boolean visitDevice(in string deviceID, in nsICacheDeviceInfo deviceInfo);
I thought I was dealing with c++, but “in” is not a c++ keyword according to c++ keyword lists i looked up, nor is it a java keyword. So what’s it there for and what’s it mean?
It means that the parameter is an input parameter, meaning that it will be used but not modified by the function.
The opposite of an
inparameter is anoutparameter, which means that the parameter is going to be modified, but not explicitly returned. If you were to use anoutparameter after a method that uses it, the value is going to (potentially) be different.As nos points out in the comment, the page you linked to is describing a
.idl, or Interface definition language, file. I’m not familiar with the IDL that Mozilla uses (but if you want to learn more, you can read about it here), but I am somewhat familiar with the Object Management Group’s IDL, which says thatinparameters are call-by-value,outparameters are call-by-result, andinoutparameters are call-by-value/result.