Identifying programming language [closed] - programming-languages

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I've been given a very small snippet of code and it piqued my curiosity. I'm wondering what the language is. I'd like to put the snippet up but it belongs to someone else and they wouldn't appreciate it being posted.
Suffice to say that what I've received looks like a function with a *.sub filename.
The keyword macro is used A LOT with a macro name following the keyword, like a function call with what would appear to be arguments separated by a comma.
if statements are terminated by endif.
The program was written for an embedded device (SiLabs device if I remember correctly).
Comments are denoted by ;.
End of commands are denoted by and end of line.
I've programmed in C/C++/C# and so my broader programming experience is lacking. Does anyone know what language I'm referring to?

I'm going to guess 8051, based on the front page of the SiLabs website.
Should look something like this:
http://www.microapl.co.uk/asm2c/sample8051asm.html
To distinguish it from other assembly languages, you'd look for instructions like SETB, CJNE, DJNZ, and arguments like #R1, DPTR, ACC. 8051 can also address individual bits of some memory locations, written as ACC.7 or P0.1.

Definitely Assembly language, but syntax may vary. Different assemblers features different syntax, also syntax may vary depending upon hardware used.
For Ex comment syntax -
'#' are used for i386, x86-64 etc
';' are used AMD 29K family, motorola, PowerPC
Also some high level assemblers hides some abstractions

Sounds like an assembly language. Hard to tell for which micro controller/microprocessor it is for though.

Related

create syntax checker vim plugin for a new Programming language [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I want to create a new vim syntax checker for a new programming language that is not used widely, first i tried to read the code of the follwing plugins neomake, syntastic
, and Ale in order to understand how i can build my own syntax checker plugin but i could not really get it
so i just want know what is the best and easy way to create syntax checker plugin for vim
I am not sure what you are asking for, here.
At a very high level, linting works like this:
you pass a file to some program or some code via stdin,
the program analyses the code in the file,
the program outputs nothing if the code is correct or a list of errors if the code is incorrect.
For example, assuming our linter is called mylinter:
$ mylinter file_with_correct_code.foo
<nothing>
$ mylinter file_with_erroneous_code.foo
/path/to/file_with_erroneous_code.foo:12:23: missing semicolon
No one knows anything about your language or compiler so you are the only one who can tell if and how your compiler can be used as described above, which is a prerequisite for Vim integration.
How to integrate it in Vim is the next step, and it is entirely dependent on those informations, which you failed to provide.
So…
Figure out if/how your compiler can be used that way.
We can't do that for you.
Read the help section I already pointed to in the comments: :help write-compiler-plugin to know how to integrate your linter in Vim the vanilla way or the relevant sections of the plugins you want to integrate with.
We may be able to help with specific issues.

Which programming language for multilingual Bible app? [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 3 years ago.
Improve this question
I was wondering, in order to make a user-friendly web-based program for reading the Bible in several foreign languages, which programming language would be best to use?
Some criteria:
-Bible would be able to be read linearly. So one verse will be in English, but the line underneath the verse would be the same verse but in a different language like Chinese. So I think I would need to be able to create different databases for each language.
-Would like to make words clickable for definitions, so would need some dictionary database and be able to display several boxes at once on the program interface (one box will be just the bible text, another box would be the dictionary definitions).
Would like users to be able to drag the boxes or toggle the boxes on and off, to customize the way they want to display the features of the program.
-Would like to be able to let users create a username and password and login to their personal accounts which will save their settings and any notes they make.
I am familiar with coding but I am no expert, if you could please help me out and let me know which programming language (and maybe which functions in that programming language?) would be best to help me create what I mentioned above. Thank you so much!
In general, I would recommend finding a mature program that already does something similar and improving that. cf. http://wiki.c2.com/?TheZenOfProgramming
In particular, how would you be improving on, for example, bibleWebApp? Or The Sword Project? Or And Bible? Or BibleTime?
There is certainly an argument for writing code in order to learn, but if that is not what you are doing, the world will be better off if you apply your energy to improving existing code and not to reinventing the wheel.
Given that, the answer to your question is:
use the programming language that the mature program uses; or
use whatever programming language you want to learn about

Can long flags be followed by a single character? [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 4 years ago.
Improve this question
I'm aware that the general convention is that short flags (or single dash "-") is followed by a single character, and long flags (or double dash "--") is followed by multiple characters (usually an English word). Also, sometimes multiple short flags can be written like this as shorthand ("-l -c" as "-lc").
However, is this also valid "--c"? It seems to be breaking the aforementioned convention but is it fine as long is it's a unique flag identifier?
Tried searching the web but wasn't able to find any results on this.
Yes, as a general rule, neither your shell nor your kernel cares about the format of the arguments you pass to your command, as long as the program you're writing expects that format.
However, if by "can" you mean "does that respect the POSIX conventions of command arguments", then you should look at the Utility conventions part of the POSIX standard. In the last published version, there is no particular restriction against what you want here, therefore you should be fine.
That said, when you write programs for other people, try to apply the Principle of least astonishment. People usually expect single letter commands to be preceded by a -, so it is a good practice to follow the de-facto conventions when possible.

What is the standard for documentation style in Bash scripts? [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 5 years ago.
The community reviewed whether to reopen this question last month and left it closed:
Original close reason(s) were not resolved
Improve this question
I am currently writing a Bash script that has a number of functions in it and would like to add docs to make other team members understand what the point of the function is.
Is there a standard "style" for documenting Bash scripts and the functions it contains?
I do understand I'm adding an answer to an old question, but I feel the tooling has improved lately and would like to give additional suggestions in order to help out others who are viewing this question.
I have recently found TomDoc.sh, which uses TomDoc style comments in shell scripts. The tool provided can then extract information and generate markdown or plain text documents.
Other tools also exist. BashDoc is modeled after the JavaDoc syntax, supporting a variety of tags. With RoboDoc you embed a C-style comment in your Bash code and it extracts the necessary information. Lastly, Apple uses HeaderDoc for its shell scripting. All three of these have a suggested style for the comments that you write.
If you wish to annotate your code more than generate documentation, shocco.sh may be what you'd prefer. It doesn't have a specific format and is designed for you to see human-readable text describing the shell commands that you are running.
Usually, I try to follow guidelines that are analog to the ones I use with other languages like C.
This includes a function header containing:
function name, short description and purpose
list of arguments and return values, with descriptions
list of all side effects (e.g., changes in variables or files)
To my understanding there is no standard for Bash doc.
But typically you would:
include a header to your bash file, with your name, copyright,
contact, and briefly what the script does
a usage() function that
explains how to launch and use your function.
a comment at the top of
each function to explain what the func does.

which software can view any developed software code? [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 11 years ago.
Improve this question
I would to know the software which can view code of Microsoft word software and any other software code. So that I can learn from that software code and how they used in there.
(sound's like illegal but really it is helpful for the programmer)
any Ideas
What you're describing is called a disassembler or decompiler. It is rarely useful for what you want it for, because the intent of the programmer expressed in variable, method, and class names - is mostly lost. This is somewhat less true for modern bytecode languages like Java and C#.
You ask for a decompiler. Please note decompiling is illegal in many juridictions. Also once you decompile you usually get very hard to read assembly code learning from which is problematic unless you have plenty of experience and know exactly what you're looking for.
You need to get a decompiler for viewing the code of dll and exe files based on the language its coded in.
example:
Delphi Dll Decompiler
search for an appropriate decompiler te get the code back.

Resources