Is there a way to write comments in modern Cobol? [duplicate] - cobol

This question already has answers here:
Is it possible to add inline comments in Cobol
(4 answers)
Closed 7 years ago.
I'm trying too see how I could add comments to my COBOL program. I know the modern version of COBOL has a way where comments can be written but I am unsure on how to do this.

*> for inline to-end-of-line comments, fixed and free form (in fixed form the *> will have to be in column 7 or greater).
* in column seven for fixed form COBOL
* in column one, extension for free form, not recommended as it can lead to ambiguous code.
and allowed in some identification division header paragraphs, REMARKS for instance, now marked obsolete, but still used.
Smart COBOL comments are now supported in ROBODoc, latest version enhanced for COBOL.

Related

Cobol to Delphi [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
everybody!
I need to develop an application, in Delphi, to show some data from a COBOL file.
Example: A software made at Cobol has a file of customers with some attributes (ID, NAME AND PHONE). I need to show this data file in a DBGrid of my Delphi program. Is it possible? If yes, how can i do my Delphi program comunicate with COBOL file?
Thanks!
Typically data written by COBOL programs is done from a "struct" defined in a COBOL "copy book".
You need to get your hands on the copybook; it defines the content and the layout of the data. That data will be written in an encoding specific to the machine on which the COBOL program ran; it may be a mainframe, so string data may be EBCDIC (not ASCII), and there may be other differences.
You'll have to learn enough about COBOL, copybooks, data encoding, and bit patterns to do this. Welcome to computing.
With an understanding of the data layout and encoding, you can write a Delphi program to read the binary data and interpret it properly.

Lua alternatives for "type" [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Many times I need to have a variable to express the type of something, but as you probably know it is also the name of a function in Lua.
What could be a proper workaround? I thought of:
Use it anyways. Since I use almost only local values, the type function isn't overwritten but it becomes temporarily inaccessible (also a problem when used as an argument name).
Using a synonym of the word "type" (probably the easiest solution), but I can't come up with anything good.
Using upper case, prefix/suffix, like Type, TYPE or _type, but it goes against the code style used so far.
Save the type function as something else and restore it at the end.
Add a global reference to type called for example 'typeof' so that when type is used locally I can still use typeof.
Recompile Lua with a different name for the type function (no thanks!)
The only sensible options are #2 and #3, choosing one of the others usually is asking for troubles.
Keep in mind that naming conventions are just that, conventions. In exceptional cases breaking the convention to make the code more readable is a good thing.
On the other hand, overloading/changing/fiddling with the standard library names is far worse, especially because you do it just to avoid some names that you don't like so much for your identifiers.
Although they are not considered reserved identifiers with the same strong rules as C (the only really reserved names are those that begins with an underscore followed by a capital letter), Lua standard library names should be considered reserved, unless you have an extremely compelling reason to do otherwise, especially in large applications. Preserving naming conventions is not such a compelling reason.
Usually I use the word kind for that purpose.

Why CLDR and Windows have different currency formatting? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In the world of internationalization, CLDR (Common Locale Data Repository) seems to be the ultimate database and as I learned, many systems derive their locale data from that.
However, I compared CLDR data and the locales in Windows 7 and currency formatting is different in many cases.
For example, Canadian dollar in locale "English (Canada)" is formatted as follows:
Windows: $1,235.00, -$1,235.00
CLDR...: $1,235.00, ($1,235.00)
Or let's take Spanish (Colombia) and Colombian peso:
Windows: $ 1.235,00, ($ 1.235,00)
CLDR...: $1.235,00, -$1.235,00
Note variations in negative numbers and spacing. What should I think of this? Most likely there are more such differences. Are both formatting rules OK, or could it happen that one is perceived by local users as wrong?
Although it is not programming related, I will try to answer your question.
I once asked on CLDR's internal mailing list about (incorrect) Polish date formats and suggested changes to it providing legal (Polish Standard) reference. The answer was that CLDR tries to follow national standards, but sometimes it might be a good idea to use commonly used format instead.
There are two answers to your question:
either the format defined is more commonly used than the one specified by the national standard
or simply there is an error in the definition - browse CLDR's bug tracking system, maybe there is (or was) something about it
As for Microsoft, I believe they are trying to follow national regulations and standards.

Is CORBA still being widely used today? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Is Corba Legacy?
I am asking this question because I don't see any new books on CORBA in recent years. I am really new to CORBA, and I am not sure if I still need to learn it.
In what situation, CORBA is still useful?
My last job at a defense contractor used CORBA heavily. (And ACE/TAO)
I have only used it at one job of about 8 in the last 15 years. It was talked about at a few other places I was at - but none used it.

How to convert the amount of indentation in a source code file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I find that I now often work with code bases that have different amounts of indentation. Some use 2 spaces, some use 4 space, some even use tabs! Once in a while, I have to share code between these codebases, or, sometimes I use an incorrect amount of indentation by mistake. Is there a tool or a text editor feature that will convert between different amounts of indentation?
Update: I mostly code in Javascript, HTML, CSS and Python now days. I'd prefer some thing language agnostic, because I work with a few different languages.
It depends on what you're using. In recent versions of Visual Studio, for instance, ctrl-k,ctrl-d will format the entire document you're working on.
A couple quick commands in Vim will convert all the tabs in a document to spaces.
At the command line, indent will reformat C source code.
UltraEdit is a text editor that has some excellent search/replace capability, plus you can toggle the visibility of whitespace characters. It's easy to convert 4 spaces to a tab, and vice versa. However, it's not something you would probably want to convert files in often, it's more of a text editor on steroids than a tool for just tab/space refactoring purposes.
For C, C++, C#, and Java code, you can use Artistic Style (astyle) to beautify/stylize the code according to your preferences. Tabs vs. spaces (as well as how many spaces) are one of many available options.
You don't say which language your developing in but I've used jalopy for Java and perltidy for Perl before.
Both of these tools you can set indent amount and brace style etc.
Here are a bunch of language-specific reformatters.

Resources