View Single Post
Old 19 August 2015, 21:14   #251
Registered User

Daedalus's Avatar
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,747
I code both in C and in BASIC, so like I said earlier in my post, I do understand the reasons and advantages of checking an assignment like that. Nevertheless, it is confusing if you're new to programming, and I've had to explain it to people in the past. == might make perfect sense to you because you're using it for so long but it is *not* intuitive to anyone who hasn't seen it before.

I know different BASICs are different, and that there isn't really a "normal" BASIC (well, there is a standard but nobody uses it), but as I said earlier in the thread, switching between dialects was never a problem for me when I was learning on the BBC / C64 / Atari 800XL. I just needed to look up in the manual what the equivalent was and work around the difference. I recently ported a small game I wrote from Blitz Basic to Visual Basic, and it took a couple of hours in total, including changing over OS-specifics like the window menus (which suck in .NET), building the interface, converting the AmigaGuide to HTML Help, converting the graphics format and so on. No big deal. I've spent similar lengths of time "porting" C code between two C compilers, so it's not like C is totally portable either.

Semicolons in Blitz are for comments, nothing else. Just like AmigaDOS. So every parameter is separated by commas. Same in VB except comments are apostrophes. To be honest I can't think of a BASIC dialect that uses semicolons as an argument separator, but like you're keen to point out, that just shows how the dialects differ.

Your examples of string handling seem quite odd to me, it's a long time since I've seen a BASIC that has needed to do that sort of operation to join strings. Pretty much every BASIC nowadays lets you use an operator to join strings, and lets you use strings pretty much like a numeric variable - something C is sorely lacking.
a$="Hello World!"
is much nicer, and more intuitive than
char a[20];
strcpy(a, "Hello World!");
for example.
Daedalus is offline  
Page generated in 0.03996 seconds with 10 queries