Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Where are spaces required in COBOL source code?
While playing around with the COBOL12 compiler (discussed elsewhere
recently in this newsgroup), I ran into a few peculiarities. This is a
DOS compiler that looks like a subset of 74 standard COBOL but has some
extensions and some omissions. Its display is unusual since it uses a
graphics mode to display text. Anyway I noticed two strange things. The
compiler does not accept blank lines in source code and it requires a
variable name to be separated by at least one space from the
parentheses enclosing a subscript (or an expression denoting reference
modification). An old CP/M era compiler also had this requirement for
subscripts (of course there was no reference modification).

1. Was this ever part of a COBOL standard?

2. I sometimes find it puzzling that spaces seem to be required around
certain things in COBOL when I don't expect them to be. For example
after commas (in CALL), around the colon in reference modification (at
least in the compilers I've tested) and around operators in a COMPUTE
expression.

Please note that the first language I learned was FORTRAN using
fixed-form (punched card) format. There spaces are only meaningful
inside string literals.

Is there a general rule about this for COBOL and has it changed with
different versions of the standard?

(Sorry if this is a FAQ.)


Report this thread to moderator Post Follow-up to this message
Old Post
epc8@juno.com
05-30-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.