Wow, highly readable. We might need to call Jeff for help...
It just doesn't look right without line numbers...
or ' replaced with REM statements.
:)
--
______________________________________________________________________________
| spi...@freenet.co.uk | "I'm alive!!! I can touch! I can taste! |
|Andrew Halliwell BSc(hons)| I can SMELL!!! KRYTEN!!! Unpack Rachel and |
| in | get out the puncture repair kit!" |
| Computer Science | Arnold Judas Rimmer- Red Dwarf |
------------------------------------------------------------------------------
> Based on what I have seen wrtitten
> XBasic for Linux is a very good Basic and might
> even be the best version of BASIC available.
> xbasic was designed for Linux.
> Very simple example program is next
> ' delete all lines above this line
> ' This is the FIRST LINE of this BASIC PROGRAM
> PROGRAM "gamexb07"
> ' This gamexb07.x xbasic game program is written
> ' by Eric Matteson. Permission is granted to copy
> ' this gamexb07.x source code and to publish it
> ' on the Internet and to use it at least for
> ' non profit use.
> <snipped code>
You maybe should have put your code onto a web site with a link to it.
I understand that you are after giving potential Xbasic users a quick win
with a working program. But that code doesn't look inviting, it may well
put many people off.
Starting with the declarations, function names that only have a meaning to
the writer, does Xbasic have a limit of function names length? I don't go
in for huge function names, but when there are no limits you might as well
say what the function does.
Then we get setting up an array, one element at a time. That had to be done
at one time and anyone who has done huge arrays like that will have done
what I did, looked at it and groaned at the thought of manually writing any
such array ever again. If Xbasic has a better way to assign arrays then you
should show that instead.
Same with the mass of individual print statements. That caused groan number
two for me I'm afraid, from the day I discovered the words 'call' and 'ret'
I never wrote any more print statements than absolutely necessary.
Then much of the rest just looks messy and I can't see it attracting many
new users.
Sorry to be critical, I know you mean well, but it is important to make the
code look attractive to potential new users. It doesn't matter if that
means you have to break it up into more functions, it's just text in the
end, not going to tap too much of the downloaders's bandwidth.
> Wow, highly readable. We might need to call Jeff for help...
Almost every BASIC was highly readable, it's what the BEGINNERS is for.
:)
--
______________________________________________________________________________
| spi...@freenet.co.uk | "Are you pondering what I'm pondering Pinky?" |
|Andrew Halliwell BSc(hons)| |
| in | "I think so brain, but this time, you control |
| Computer Science | the Encounter suit, and I'll do the voice..." |
------------------------------------------------------------------------------
Damn.
And I really wanted to see all those GOTO statements.
Oh well.
> Sorry to be critical, I know you mean well, but it is important to make the
> code look attractive
Er ... is that even *possible*?
--
K.
http://slated.org
,----
| Vista | 3D Desktop | Cheap : Choose two.
`----
Fedora Core release 5 (Bordeaux) on sky, running kernel 2.6.20-1.2312.fc5
10:22:07 up 45 days, 7:54, 3 users, load average: 0.19, 0.13, 0.16
> outerfirst$=larry$[0]
> outerdepth#=numfroml#(1,2,10,"i",outerfirst$)
> regwid#=dprecise#(outerdepth#,10,72)-3
> testin# = 1.0 / 7.0
For crying out loud. Ever hear of declaring variables? Those # signs
everywhere are ugly as sin.
quite
though, even without declared variables most other basics don't worry about
that. They have a default type.
So if you DO need to specify something as an integer, you'd use %, string,
$, otherwise, it would be assumed to be floating point.
--
______________________________________________________________________________
| spi...@freenet.co.uk | |
|Andrew Halliwell BSc(hons)| "The day Microsoft makes something that doesn't |
| in | suck is probably the day they start making |
| Computer science | vacuum cleaners" - Ernst Jan Plugge |
------------------------------------------------------------------------------
<snip>
When I was a boy, as part of my Computer Studies course I had to write
programs, in BASIC, for the BBC-B micros that we used at school at
that time. I grew to hate BASIC then and, looking at your code, I
think I probably still hate it.
Don't indict BASIC based on one fool's post. There's no reason why it
could not be cleaned-up with white-space, indentation, etc.
[rest snipped]
364 lines is "simple"???
BTW...Gambas is already out there; you have competition.
--
#191, ewi...@earthlink.net
Windows Vista. Because it's time to refresh your hardware. Trust us.
--
Posted via a free Usenet account from http://www.teranews.com
You need some pretty MS Visual Basic:
Public Function getFieldNames(tblName As String) As String
'RETURN A STRING CONTAINING ALL THE COLUMNS IN A TABLE
getFieldNames = ""
Dim rsG As Recordset, k As Byte
Set rsG = db.OpenRecordset("SELECT TOP 1 * FROM [" & tblName & "];", ,
dbOpenSnapshot)
For k = 0 To rsG.Fields.Count - 1
getFieldNames = getFieldNames & "[" & rsG(k).Name & "], "
Next k
rsG.Close
Set rsG = Nothing
getFieldNames = Left(Trim(getFieldNames), Len(Trim(getFieldNames)) - 1)
End Function
> Based on what I have seen wrtitten
> XBasic for Linux is a very good Basic and might
> even be the best version of BASIC available.
IMHO - that ain't saying one hell of a lot.
Does it use Control G to ring the bell?
> chrisv <chr...@nospam.invalid> wrote:
>>
>> For crying out loud. Ever hear of declaring variables? Those # signs
>> everywhere are ugly as sin.
>
> I also have written C++ programs. In C++ I have heard of declaring
> variables. Below is a link to a C++ program that I made that I declared
> variables in.
Good. Do it in BASIC, too.
The only links I could find indicate that nothing has been updated since
2002 - is that correct??