Search from various English teachers...
Ukraine flagIvan
Is it correct not to use 'to' before an infinitive which is a complement in a sentence? While reading the book 'Head First Design Patterns', I came across this sentence on page 364: All she has to do to print the entire menu hierarchy - all the menus, and all the menu items - is call print() on the top level menu. Is it correct not to use 'to' before 'call print() on the top level menu'?

Answers · 4

1
As James says this is a piece of technical writing -- I recognise it as being about computer programming. The sentence sounds idiomatically correct as it stands. However, I think it would be just as good if it said "is to call print() .. ". I am sorry I don't know what the rule is.
1
your example is from a technical source thus it is hard to know. "call print" may be functioning as a noun here. Eg: All I have to do is study. It has been a long time since high school and I have forgotten some grammar terms, but I believe study is a verb acting as a noun in that sentence. So in your example, "call print" may work just fine but because it is a technical source with jargon phrases, it is hard for me to know if it is a mistake or not.

Still haven’t found your answers?

Write down your questions and let the native speakers help you!

Don’t miss out on the opportunity to learn a language from the comfort of your own home. Browse our selection of experienced language tutors and enroll in your first lesson now!

Start Learning Today