limiting characters upto <xyz> columns

Hi,

Recently i did some code changes in one of the text file.
During the code review,i've been asked to allign the comments
in this file to XYZ columns(say XYZ=40).
Now the problem is that this file is a huge one and
it would be really pathetic if i go ahead and do it manually.
I think there must be a better way of doing it,Can it be done
through a shell script ?

Can this variable(COLUMNS) is used for doing the same?

[amit@localhost ~]$ set|grep -i columns
COLUMNS=155 <===

~amit

Hi.

I didn't notice that you named a specific language.

The best way to communicate here is to post a sample of what you have and what you want. You mentioned code review, so you should know what requirements are -- what are those for your question?

Please put CODE /CODE tags around your code and data -- select the text and click the # button above the editing window ... cheers, drl