3 ms·
I'm not sure I could answer that question in a satisfying way. Digging into my memory of QBASIC, I think a procedure (called a subroutine?) doesn't have local
by torstenvl 5y ago
I'm not sure I could answer that question in a satisfying way.
Digging into my memory of QBASIC, I think a procedure (called a subroutine?) doesn't have local variables and doesn't accept arguments, whereas a function does?
There are also probably FP languages that distinguish from between a pure function and something that might have side effects?
- CRConrad 5y agoIn Pascal and its descendant (and probably ancestor) languages: A function returns a result, whereas a procedure doesn't.
- Clubber 5y agoRight. It was for a Delphi position back in the early 2000s. It's a very simple and straight forward question that someone unfamiliar with Delphi/Pascal probably wouldn't know but someone who does could answer it immediately. It's a great type of question. This technique is used to detect stolen valor by asking, "What was your MOS?" Someone who served in the military could answer it immediately, someone who hasn't would struggle with it. A C++ style type question could be: What's the difference between an object and a struct? A SQL question could be, what's the difference between a join and a left/outer join? Something everyone who works with that language would know without hesitation and could answer in a few words. No trickery, just a quick filter, then you can go onto more meatier topics like discussions of prior projects.
- CRConrad 5y ago> This technique is used to detect stolen valor by asking, "What was your MOS?" Someone who served in the military could answer it immediately, someone who hasn't would struggle with it. Hey, I served my year like (almost) everyone else, but I'd probably flunk that anyway: The only "MOS" we had in the Swedish army was potatismos and rotmos.