Do we really want to go down the road of which programming language is better? If we nailed down this topic to a Windows operating environment, I could show you many examples of C programming that Basic probably couldn't even come close to attempting. Furthermore, at least 80% of all the applications that I have seen created in Basic, looked like they were put together by a child.
Let's get serious.
EDIT: Let's pit Microsoft's best C against Microsoft's best Basic
POST
QUOTE Mickster
"I like the fact that BASIC has so many built-in functions and commands.""
ENDQUOTE
REPLY
PARAGRAPH
SENTENCE
It is preferable to have as much as possible put into functions that are
external to the language syntax and semantics itself.
ENDSENTENCE
SENTENCE
This makes it possible swap out implementations so at better meet
your needs, say minimizing size, or including internationalization, etc.
ENDSENTENCE
SENTENCE
Also, what your program does not use does not get linked in, that's great
when you want tiny code.
ENDSENTENCE
SENTENCE
Tellingly the Python guys realized this and now their "print x" built in
is the "print (x)" function.
ENDSENTENCE
ENDPARAGRAPH
ENDREPLY
QUOTE Mickster
"Never did get the brevity-is-beautiful premise of the C language."
ENDQUOTE
REPLY
PARAGRAPH
SENTENCE
I feel that brevity is beautiful.
ENDSENTENCE
SENTENCE
Up to a point, C has it about right, APL over did it.
ENDSENTENCE
SENTENCE
I find all the redundant junk in source code like BASIC is annoying and ugly.
ENDSENTENCE
SENTENCE
It taxes ones brain cycles to filter it out.
ENDSENTENCE
SENTENCE
Perhaps that's why we punctuation and formatting in human languages
rather than keywords!
ENDSENTENCE
ENDPARAGRAPH
ENDREPLY
QUOTE jmg
"Contrast that with C, where a whole string of } are the End closures for almost everything.."
ENDQUOTE
REPLY
PARAGRAPH
SENTENCE
IF you have a long string of } THEN
you are doing it wrong.
ENDIF
ENDSENTENCE
ENDPARAGRAPH
ENDREPLY
QUOTE jmg
"You really DO need a smart Syntax highlighting Editor + style rules, to help you out of that morass."
ENDQUOTE
REPLY
PARAGRAPH
SENTENCE
A syntax highlighter is a luxury not an essential, a lot of the time I
don't bother with such things.
ENDSENTENCE
SENTENCE
Source code, like poetry, should flow nicely and not need a syntax
highlighter to make it readable.
ENDSENTENCE
SENTENCE
Style rules are always a good idea, especially in a language that supports GOTO :)
ENDSENTENCE
ENDPARAGRAPH
ENDREPLY
QUOTE jmg
"Source-code-Size has not been an issue for some decades,..."
ENDQUOTE
REPLY
PARAGRAPH
SENTENCE
It is not about how many bytes it takes to store. Source code size is
an issue for the mind that has to read it.
ENDSENTENCE
SENTENCE
Filtering out all that redundant verbiage is unnecessary mental work.
ENDSENTENCE
ENDPARAGRAPH
ENDREPLY
ENDPOST
Let's pit Microsoft's best C against Microsoft's best Basic
There's only one C. OK, maybe there's a few variations of C, but the differences are pretty minor. There seem to be lots of varieties of Basic. So maybe the proponents of Basic should fight it out to determine which one is the best one, and then we can compare it with C.
There's only one C. OK, maybe there's a few variations of C, but the differences are pretty minor. There seem to be lots of varieties of Basic. So maybe the proponents of Basic should fight it out to determine which one is the best one, and then we can compare it with C.
I was just trying to point out that we need a playing field with some highly competitive opponents. Visual Basic and Visual C++ seem to be worthy opponents
For example, Charles Petzold, a well known book author of programming with C for Windows, once wrote a C program named "Scramble.exe". Let me see a Visual Basic program that can even come close to the C version.
I was just trying to point out that we need a playing field with some highly competitive opponents. Visual Basic and Visual C++ seem to be worthy opponents
Yes, but you mentioned Microsoft, which is going cause a lot of the people on this forum to scurry away like rats from a sinking ship.
And then, once again in a Windows environment, well known author Dino Esposito has shown many examples of scripting the Windows shell. I would really like to see some Visual Basic programming that could duplicate his work.
What is one reference, I have a bunch of references. I cannot know them all. If you think Charles Petzold, Dino Esposito, Jeff Prosise, David Kruglinski, George Shephard, Scott Wingo, and Ivor Horton are slouches, then you are sadly mistaken. What the heck do I need K&R for????
I'm warming up to C, it's like a pre-compiler for Asm and if you write the syntax correct it's pretty efficient and IAR have a setting for high that can be based on speed or code size.
example, A function can be set for __inline and it will not actually call it but treat it as a macro if your settings is for speed.
If you #include <stdbool.h> you get boolen support, but it does waste a whole byte for a 0 or 1.
bitfield structure extension does handle bits as boolen just fine, add Union and you got yourself a nice GPIO register system.
struct {
char a:1;
char b:1;
char c:1;
char d:1;
char e:1;
};
re:once again in a Windows environment, well known author Dino Esposito has shown many examples of scripting the Windows shell. I would really like to see some Visual Basic programming that could duplicate his work.
====================================================================
Windows Script Host Programmer's Reference Paperback – Dec 1999
by Dino Esposito (Author)
The Windows Script Host (WSH) is Microsoft's response to the need for a way of programming Windows in a manner analogous to the way batch files can be used to automate jobs in MS-DOS. Rather as Office 2000 provides VBA (Visual Basic for Applications) as a development tool, Windows 98 and Windows 2000 contain the Windows Script Host.
WSH enables you to use scripting languages - VBScript and JScript are available by default - to access
WSH was designed to work with VB scripting >>
(copied & pasted from below)
- WSH engines include various implementations for the REXX, BASIC, Perl, Ruby, Tcl, PHP, JavaScript, Delphi, Python, XSLT, and other languages.
- Windows Script Host supports scripts that are written in Visual Basic Scripting Edition
From Microsoft:
Windows Script Host supports scripts that are written in Visual Basic Scripting Edition (VBScript) or JScript. When a script is started from the Windows desktop or from the command prompt, the script host reads and passes the contents of the specified script file to the registered script engine. The script engine uses file name extensions (.vbs for VBScript; .js for JScript) to identify the script instead of using the SCRIPT tag (used in HTML). Because of this, you do not have to be familiar with the exact programmatic identifier (ProgID) of the script engines. The script host itself maintains a mapping of script extensions to ProgIDs, and uses the Windows association model to start the appropriate engine for a given script.
WSH engines include various implementations for the REXX, BASIC, Perl, Ruby, Tcl, PHP, JavaScript, Delphi, Python, XSLT, and other languages.
================================================================================
Windows Script Host
From Wikipedia, the free encyclopedia
The icon for Windows Script Host
The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. It was originally called Windows Scripting Host, but was renamed for the second release.
It is language-independent in that it can make use of different Active Scripting language engines. By default, it interprets and runs plain-text JScript (.JS and .JSE files) and VBScript (.VBS and .VBE files).
Users can install different scripting engines to enable them to script in other languages, for instance PerlScript. The language independent filename extension WSF can also be used. The advantage of the Windows Script File (.WSF) is that it allows the user to use a combination of scripting languages within a single file.
WSH engines include various implementations for the REXX, BASIC, Perl, Ruby, Tcl, PHP, JavaScript, Delphi, Python, XSLT, and other languages.
Windows Script Host is distributed and installed by default on Windows 98 and later versions of Windows. It is also installed if Internet Explorer 5 (or a later version) is installed. Beginning with Windows 2000, the Windows Script Host became available for use with user login scripts.
I thought I was very clear in Post #130. Perhaps I need to explain it to you
For example, Charles Petzold, a well known book author of programming with C for Windows, once wrote a C program named "Scramble.exe". Let me see a Visual Basic program that can even come close to the C version.
I unitentionally used the word scripting, because I know he was into that stuff. I was referring more to his stuff in "Visual C++ Windows Shell Programming". Some pretty in depth stuff.
Comments
I'm pretty sure that BASIC takes a bit longer to be dumb, so that is one point for BASIC:
C: 1 - BASIC: 1
BTW: My BASIC compiler was faster than Catalina C, so one point more for BASIC:
C: 1 - BASIC: 2
Andy
Let's get serious.
EDIT: Let's pit Microsoft's best C against Microsoft's best Basic
I was just trying to point out that we need a playing field with some highly competitive opponents. Visual Basic and Visual C++ seem to be worthy opponents
Ray
Comparing C against Basic on a microcontroller, is like watching two children fighting on the playground.
Now if you put them against each other on a real computer, then we have a main attraction bout.
DING DING
Now we can debate what is a "real computer"!
Enterprise mainframe?
Super mini-computer?
Scalable guest on a cloud somewhere?
Maybe an LPAR or VPAR carved out of some other mini?
A PC? (Once we define that in the other thread)
Just what is this "real computer" you write of?
...then we can put C in one corner against the languages real enterprise level business applications are written in and see how it does.
Oh, the cans of worms you've just opened in search of the "best"!
You have made a very valid point I leave it to the rest for debate
Is this where you finally answer the OP?
I was certain that it was you who recently said on this very forum (paraphrasing) "what is K&R, I don't think I've ever heard of that"
What is one reference, I have a bunch of references. I cannot know them all. If you think Charles Petzold, Dino Esposito, Jeff Prosise, David Kruglinski, George Shephard, Scott Wingo, and Ivor Horton are slouches, then you are sadly mistaken. What the heck do I need K&R for????
LOL....kinda like a priest saying "what the heck do I need God for?"
They are the creators of your beloved programming language.... Lol
I've always looked C as a high level assembler!!
So what, I couldn't give a flying saucer who created it. All I know is that it will blow the pants off Basic.
C.W.
Cool, so here is your cue!
You just keep antagonizing me.... Don't you ever get tired of being an .....
And do you ever make a worthy contribution besides causing trouble?
Do you see me using the Parallax forum to advertise my, well, vaporware skills?
Let's attack the languages not each other!
I merely would like to see what was claimed in post #124
re:once again in a Windows environment, well known author Dino Esposito has shown many examples of scripting the Windows shell. I would really like to see some Visual Basic programming that could duplicate his work.
====================================================================
Windows Script Host Programmer's Reference Paperback – Dec 1999
by Dino Esposito (Author)
The Windows Script Host (WSH) is Microsoft's response to the need for a way of programming Windows in a manner analogous to the way batch files can be used to automate jobs in MS-DOS. Rather as Office 2000 provides VBA (Visual Basic for Applications) as a development tool, Windows 98 and Windows 2000 contain the Windows Script Host.
WSH enables you to use scripting languages - VBScript and JScript are available by default - to access
http://www.amazon.ca/Windows-Script-Host-Programmers-Reference/dp/1861002653
===================================================================================
WSH was designed to work with VB scripting >>
(copied & pasted from below)
- WSH engines include various implementations for the REXX, BASIC, Perl, Ruby, Tcl, PHP, JavaScript, Delphi, Python, XSLT, and other languages.
- Windows Script Host supports scripts that are written in Visual Basic Scripting Edition
From Microsoft:
Windows Script Host supports scripts that are written in Visual Basic Scripting Edition (VBScript) or JScript. When a script is started from the Windows desktop or from the command prompt, the script host reads and passes the contents of the specified script file to the registered script engine. The script engine uses file name extensions (.vbs for VBScript; .js for JScript) to identify the script instead of using the SCRIPT tag (used in HTML). Because of this, you do not have to be familiar with the exact programmatic identifier (ProgID) of the script engines. The script host itself maintains a mapping of script extensions to ProgIDs, and uses the Windows association model to start the appropriate engine for a given script.
WSH engines include various implementations for the REXX, BASIC, Perl, Ruby, Tcl, PHP, JavaScript, Delphi, Python, XSLT, and other languages.
================================================================================
Windows Script Host
From Wikipedia, the free encyclopedia
The icon for Windows Script Host
The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. It was originally called Windows Scripting Host, but was renamed for the second release.
It is language-independent in that it can make use of different Active Scripting language engines. By default, it interprets and runs plain-text JScript (.JS and .JSE files) and VBScript (.VBS and .VBE files).
Users can install different scripting engines to enable them to script in other languages, for instance PerlScript. The language independent filename extension WSF can also be used. The advantage of the Windows Script File (.WSF) is that it allows the user to use a combination of scripting languages within a single file.
WSH engines include various implementations for the REXX, BASIC, Perl, Ruby, Tcl, PHP, JavaScript, Delphi, Python, XSLT, and other languages.
Windows Script Host is distributed and installed by default on Windows 98 and later versions of Windows. It is also installed if Internet Explorer 5 (or a later version) is installed. Beginning with Windows 2000, the Windows Script Host became available for use with user login scripts.
http://en.wikipedia.org/wiki/Windows_Script_Host
=================================================================================================================================================
WSH isn't even in the same ballpark as C or full blown Basic.
I unitentionally used the word scripting, because I know he was into that stuff. I was referring more to his stuff in "Visual C++ Windows Shell Programming". Some pretty in depth stuff.