Thursday, September 28, 2006

Basic stuff

... by which I mean Basic, the computer language. A discussion on Making Light, plus this page about so-called Classic Basic programs, got me thinking again about the way that I used to be able to write simple programs for the Apple II computer. Nothing complicated, really, no three-D graphics or interactive video or anything like that. Just simple logical constructions that would, say, generate a set of random numbers or text values within certain parameters, or allow the user to follow a branching path of decisions, or create & compile simple datasets like game characters, or (more to the point of my current needs) generate randomized daily switching lists for a model railroad. B./Yam will no doubt remember the sort of things I'm talking about.

Is there a way to easily replicate this functionality with present-day computers?

Added note: Came across a page of links to "free BASIC compilers", but am clueless about what exactly "compilers" are or what to do with them. Duhhhh.

1 comment:

Felix said...

Pablo @ 4:05PM | 2006-09-28| permalink

It sounds like you could do all those things in Excel.

email | website

Yam @ 7:15PM | 2006-09-28| permalink

Agreed - Excel could probably handle your needs. But if you want BASIC, the compilers ought to have a user faq somewhere. I think I might also have an old copy of Visual Basic around here somewhere. You're welcome to it if you want it.

email | website

Felix @ 9:34PM | 2006-09-28| permalink

I didn't know Excel had a random-number feature.

Can it do things like add up the number of "1"s that result from a series of "dice rolls", randomly select one of several text-strings as "destination", and display the results in the form of, "Grain elevator has ordered 'X' boxcars for grain loading, destination 'Y'"?

email | website

Yam @ 8:08AM | 2006-09-29| permalink

Yup. I think that would use the functions RAND(), COUNT() or COUNTIF(), and VLOOKUP(). The hardest part is finding the names of the functions. From that point, Excel Help can tell you how they work. I think you can refresh the random number values by manually hitting F5.