Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

I recently met a quiz question and I am not sure what it means. The question is as follows (no context):

We only need to save the stack pointer for a non-leaf procedure.

Just for reference, the "non-leaf procedure" means procedures that call other procedures.

Does it mean:

  1. The only thing we need to save in a non-leaf procedure is the stack pointer.
  2. The stack pointer needs to be saved only when it's in a non-leaf procedure.

Although common sense tells me 2 is more likely to be the intention of the question setter, I am not sure what this sentence really mean in terms of English syntax. I am not a native English speaker.

share|improve this question
1  
Note that you have quoted a statement and not a question. Also, why did you change the original for into in? I don't think that is necessary or justified. –  Unreason Aug 3 '11 at 12:04
add comment

4 Answers

up vote 7 down vote accepted

The second interpretation is the correct one.

The stack pointer needs to be saved for non-leaf procedures; for procedures that don't call other procedures, the stack pointer doesn't need to be saved.

share|improve this answer
1  
That would mean that the second interpretation is correct, right? –  Tragicomic Jan 27 '11 at 7:56
2  
That's what he said for option 2. –  Mike Brown Jan 27 '11 at 7:59
1  
That's right. I guess that when it's in a non-leaf procedure confused me. –  kiamlaluno Jan 27 '11 at 8:02
1  
However, is it possible to have another interpretation? Or in English there is only one interpretation. –  LLS Jan 27 '11 at 14:53
1  
To get interpretation 1, it should have been written "We need to save only the stack pointer for a non-leaf procedure." –  Peter Shor Sep 5 '11 at 0:07
show 4 more comments

Reading this as plain English, without the benefit of years spent as a software engineer, it is an ambiguous sentence and could be interpreted as perfectly sensible either way. So you need to know the context in which the sentence was written (or have some knowledge of the domain) and so could hardly blame anyone without some basic knowledge of low-level programming for wondering.

Your interpretation #2 is the correct one and arguably a much better way to write the sentence to avoid ambiguity.

share|improve this answer
add comment

I would doubt it... from my interpretation 1. is likely the correct one, that a non-leaf procedure only requires saving the stack pointer. btw I'm not a native english language speaker, but English spoken here (India) is in conformance to the textbooks.

share|improve this answer
3  
We only need to save the stack pointer IN a non-leaf procedure - if it were this, I might agree with you. I think (2) is the intended meaning. –  CJM Jan 27 '11 at 9:46
add comment

We are out of context, but it also might mean that it is something "simple" (We don't have to worry about any other situations)

Another example: if you don't want to get late, simply set the alarm clock / if you don't want to get late, you only have to set the alarm clock.

(also: no native english speaker here!)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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