|
|
Up |
|
|
  |
Author: Lynn McGuireLynn McGuire Date: Oct 31, 2006 10:36
We have a 550,000 line program that is mostly written in upper case.
Does anyone have experience with a public domain program to
convert all the code into lower case ? Of course, comments, formats
and data statements would need to be skipped.
Thanks,
Lynn
|
| |
|
| | 34 Comments |
|
  |
Author: michaelmichael Date: Oct 31, 2006 11:01
Lynn:
I am not aware of any public utility that perfroms the task you
mention, but if you know Visual Basic it is a trivial task to write a
few lines of code to do exactly what you want.
Cheers
Michael
Lynn McGuire wrote:
> We have a 550,000 line program that is mostly written in upper case.
> Does anyone have experience with a public domain program to
> convert all the code into lower case ? Of course, comments, formats
> and data statements would need to be skipped.
>
> Thanks,
> Lynn
|
| |
|
| | 1 Comment |
|
  |
Author: Paul van DelstPaul van Delst Date: Oct 31, 2006 12:00
Lynn McGuire wrote:
> We have a 550,000 line program that is mostly written in upper case.
> Does anyone have experience with a public domain program to
> convert all the code into lower case ? Of course, comments, formats
> and data statements would need to be skipped.
How about this ruby script (that creates a backup file):
lnx:/usr1/wd20pd/tmp : dir
total 16K
-rwxr-xr-x 1 wd20pd wd4 117 Oct 31 14:54 downcase.rb*
-rw-r--r-- 1 wd20pd wd4 88 Oct 31 14:51 input_file
The script itself is simple:
#!/usr/bin/env ruby
# Define backup default
$-i=".bak"
# Inplace edit the file
ARGF.each {|line| puts line.downcase}
A test input file:
|
| Show full article (1.72Kb) |
| 4 Comments |
|
  |
Author: Bruce BowlerBruce Bowler Date: Oct 31, 2006 12:15
On Tue, 31 Oct 2006 15:00:02 -0500, Paul van Delst put fingers to keyboard
and said:
> Lynn McGuire wrote:
>> We have a 550,000 line program that is mostly written in upper case.
>> Does anyone have experience with a public domain program to
>> convert all the code into lower case ? Of course, comments, formats
>> and data statements would need to be skipped.
>
> How about this ruby script (that creates a backup file):
[major snippage]
That would work (so would emacs or any more or less modern text editor),
but notice the last sentence...
>> Of course, comments, formats
>> and data statements would need to be skipped.
|
| Show full article (0.92Kb) |
| 3 Comments |
|
  |
Author: Lynn McGuireLynn McGuire Date: Oct 31, 2006 12:22
> I am not aware of any public utility that perfroms the task you
> mention, but if you know Visual Basic it is a trivial task to write a
> few lines of code to do exactly what you want.
Yup, I am multilingual to about a dozen computer languages.
However, I would prefer to use someone else's "debugged"
work here . There could be tigers. There are most
certainly lions (fortran character strings, continuation formats,
etc).
Thanks,
Lynn
|
| |
| no comments |
|
  |
Author: beliavskybeliavsky Date: Oct 31, 2006 12:31
Bruce Bowler wrote:
> On Tue, 31 Oct 2006 15:00:02 -0500, Paul van Delst put fingers to keyboard
> and said:
>
>> Lynn McGuire wrote:
>>> We have a 550,000 line program that is mostly written in upper case.
>>> Does anyone have experience with a public domain program to
>>> convert all the code into lower case ? Of course, comments, formats
>>> and data statements would need to be skipped.
>>
>> How about this ruby script (that creates a backup file):
>
> [major snippage]
>
> That would work (so would emacs or any more or less modern text editor),
> but notice the last sentence...
>
>>> Of course, comments, formats
>>> and data statements would need to be skipped.
|
| Show full article (0.96Kb) |
| 1 Comment |
|
  |
Author: jwmjwm Date: Oct 31, 2006 14:27
> I think Emacs and/or XEmacs has a Fortran mode that allows case of
> Fortran keywords to be changed to upper or lower case. I forget whether
> it works for fixed format, free format, or both. This would do PART of
> what the OP wants -- variable names would still need to be changed.
Combining such option with the ones available in some word
processors/IDE's (e.g., Shift+F3 in MS-Word, Ctrl+U in MS-Visual Studio
2005), will do the work... I think Open-office might have a similar
option (but I don't want to reboot right now just to find out).
If using the MS-Word option (or similar), be sure to disable the
autocorrection bug/feature first (e.g., the expression "A(I,:)" could
be re-interpreted as "A(I," and the *smile* symbol).
|
| |
| no comments |
|
  |
Author: Louis KruppLouis Krupp Date: Oct 31, 2006 19:18
Lynn McGuire wrote:
> We have a 550,000 line program that is mostly written in upper case.
> Does anyone have experience with a public domain program to
> convert all the code into lower case ? Of course, comments, formats
> and data statements would need to be skipped.
I don't have any experience with this, but a Google search for "fortran
source convert" turns up this:
http://www.safesite.com/category.php%%5Bid%%5D125%%5BSiteID%%5Ddigibuy
One of the advertised bits of "trialware" is tidy72.zip, which claims to
do more or less what you want.
I have no connection to the site or to the package.
I think it would be more fun to write a Perl program that would just do it.
Louis
|
| |
| 4 Comments |
|
  |
Author: jwmjwm Date: Oct 31, 2006 20:49
Louis Krupp wrote:
> Lynn McGuire wrote:
>> We have a 550,000 line program that is mostly written in upper case.
>> Does anyone have experience with a public domain program to
>> convert all the code into lower case ? Of course, comments, formats
>> and data statements would need to be skipped.
>
> I don't have any experience with this, but a Google search for "fortran
> source convert" turns up this:
>
> http://www.safesite.com/category.php%%5Bid%%5D125%%5BSiteID%%5Ddigibuy
>
> One of the advertised bits of "trialware" is tidy72.zip, which claims to
> do more or less what you want.
>
> I have no connection to the site or to the package.
>
> I think it would be more fun to write a Perl program that would just do it.
>
> Louis ...
|
| Show full article (1.12Kb) |
| 3 Comments |
|
  |
|
|
  |
Author: Louis KruppLouis Krupp Date: Nov 1, 2006 02:32
jwm wrote:
> Louis Krupp wrote:
>
>>Lynn McGuire wrote:
>>
>>>We have a 550,000 line program that is mostly written in upper case.
>>>Does anyone have experience with a public domain program to
>>>convert all the code into lower case ? Of course, comments, formats
>>>and data statements would need to be skipped.
>>
>>I don't have any experience with this, but a Google search for "fortran
>>source convert" turns up this:
>>
>> http://www.safesite.com/category.php%%5Bid%%5D125%%5BSiteID%%5Ddigibuy
>>
>>One of the advertised bits of "trialware" is tidy72.zip, which claims to
>>do more or less what you want.
>>
>>I have no connection to the site or to the package.
>> ...
|
| Show full article (3.05Kb) |
| 1 Comment |
|
RELATED THREADS |
  |
|
|
|
|
|