Although this song is obviously from Psalm 40, I think there's more of a meaning to this song than just taking words from the Bible. The passage it's from is about hope, and how God never lets down his followers. It may take some time for God to help his people, but he always comes through in the end.
Paul Tripp, paultriphome.net ( 5:th of February 1999)
But why is the song called "40"? I think there is yet another, little less abstract explanation of the symbolic title. Forty, in the Bible stands for waiting and purification (as mentioned here). It's when Israël eats the manna for 40 years, before they reach Kanaän. Mozes stays on the mountain Sinaï for 40 days when he receives the Ten Commandments. He 'wandered' through the desert with the people of Israël for 40 years. And hadn't he been herding sheep for 40 years before he came to his mission (I'm not sure)? Jesus was in the desert, (that thing from beneath busy trying to screw Him up) while He did not eat for 40 days and nights... So: "How long, to sing this song..." stands for waiting, trusting in God relying on the Bible I would say.
Domitian van Bavel bavel42zonnet.nl ( 8:th of February 2000), Breda Holland
A few years ago [???] in 1983 we made a record called War and a ... at the end of making that record we went aahh over our schedule of making the record. We [would]? be thrown out of the studio and we had 40 minutes left of recording and we had one more song to go. - Bono, Melbourne, Australia, 13th October 1989
Jonas Steverud (Maintainer of U2MoL) (24th of November 2007)
Continue of... Jonas Steverud (Maintainer of U2MoL) (24th of November 2007) That's from an interview with Bono if I'm correct. In that 40 minutes they wanted to fill the record with one more song. They wrote it in 10 min, rehearsed 10 min, recorded it in 10 min and finally last 10 min to adjust the recorded song. No time for name so... 40. That's how I remembered that interview
Ron ronljuhotmail.se (13th of June 2011)