Author Topic: bwbasic  (Read 2225 times)

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: bwbasic
« Reply #15 on: May 21, 2011, 02:36:07 AM »
I've got hold of a openSUSE SRPM (with the patches) and after a lot of fiddling around with the spec file, I've managed to build a package without the patches. I haven't a clue what the patches are or do and my tweaked spec file doesn't look right but my package builds and appears to install correctly.

TTFN,
KK
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: bwbasic
« Reply #16 on: May 21, 2011, 04:18:29 AM »
Quote
Also, it wasn't happy with a  '60 print "output= " output' which I think ought to work, so I have to figure out why not. (Maybe a typo.)


Pleased you got it working, I use yabasic - much of a muchness.

Your syntax error, you need a comma between the string and the variable as

http://i.imgur.com/9ROxP.jpg


Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: bwbasic
« Reply #17 on: May 21, 2011, 02:26:41 PM »
The Makefile will instruct is to install in /usr/local/bin, which is appropriate if /usr/local/bin is in your path. If not, you have to add it to your path or change the Makefile to say "prefix=/usr". Normally, this is passed with "./configure --prefix=/usr", but this doesn't seem to work with this program.
Hmmmmm, --prefix=/usr works just fine here. How strange  ???

TTFN,
KK
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3789
Re: bwbasic
« Reply #18 on: May 21, 2011, 02:40:16 PM »
The Makefile will instruct is to install in /usr/local/bin, which is appropriate if /usr/local/bin is in your path. If not, you have to add it to your path or change the Makefile to say "prefix=/usr". Normally, this is passed with "./configure --prefix=/usr", but this doesn't seem to work with this program.
Hmmmmm, --prefix=/usr works just fine here. How strange  ???

TTFN,
KK


That is strange. I ran ./configure --prefix=/usr. The command ran just fine, but the Makefile still said /usr/local/bin.

Galen

Offline KernelKarter

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 270
Re: bwbasic
« Reply #19 on: May 21, 2011, 02:59:49 PM »
The Makefile will instruct is to install in /usr/local/bin, which is appropriate if /usr/local/bin is in your path. If not, you have to add it to your path or change the Makefile to say "prefix=/usr". Normally, this is passed with "./configure --prefix=/usr", but this doesn't seem to work with this program.
Hmmmmm, --prefix=/usr works just fine here. How strange  ???

TTFN,
KK


That is strange. I ran ./configure --prefix=/usr. The command ran just fine, but the Makefile still said /usr/local/bin.

Galen

Well yes, that is strange <scratches head>.

Here's a snippet from my Makefile:
Code: [Select]
prefix = /usr
exec_prefix = /usr
bindir = $(exec_prefix)/bin

Incidentally, after a bit more tweaking on the spec file, I've managed to build the package. However, as I'm a n00b as far as packaging is concerned, I'm doing this as part of my learning process and enjoying every minute of it. I have a RPM and a SRPM and the package appears to be OK as it installs correctly and I can see it in Synaptic with all the correct info displayed.

TTFN,
KK
pclinuxos-kde-2013.04 | kernel-3.2.18-pclos2.pae.bfs
- AMD Athlon 64 X2 5000+ CPU
- 4Gb RAM | nVidia 8500GT GPU

Offline dougmack

  • Hero Member
  • *****
  • Posts: 961
Re: bwbasic
« Reply #20 on: May 21, 2011, 03:40:23 PM »
To: rich2005
Thanx, Rich.  I found that out--I read the .doc file and discovered my error.  For all I remember, the "original" GWBASIC had the same thing--it's
been a while.  Since you are familiar with this, perhaps you can tell me what I need to do to make lprint output to lpr.  Most of the s/w from
long ago does output to the printer when run in DOS.  I tried a number of things based on the info in the .doc file, but couldn't find the sweet
spot.   TIA--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: bwbasic
« Reply #21 on: May 21, 2011, 04:27:05 PM »
In available docs LPRINT is listed under "unimplemented commands" chapter:
http://www.bwbasic.at/info.htm

It it's me, I would direct all output to to a text files, say $OUTFILE="/tmp/out.txt",
and at end of work, you can call something like "system("lpr " & $OUTFILE)

(not sure about syntax, never used bwbasic or gwbasic, still I have used others old BASIC languages)

AS

Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: bwbasic
« Reply #22 on: May 22, 2011, 02:45:44 AM »
@dougmack

You caught me now. As previous post I dont think you will get one of these small basics to print in linux (someone bound to prove me wrong). Yabasic will dump a graphics screen to a postscript file, for text best I can suggest is to "print" to a file

Just checked the bwbasic syntax, it is a little different to yabasic, and was nagging a bit. OUTPUT is a bw/gw basic keyword  and really should not be used as a variable even in lowercase.

so in bwbasic this should work, the file test.txt will be created.

OPEN "test.txt" FOR OUTPUT AS #1
first = 30
second = 20
result = first*second
PRINT #1 "result = " , result
CLOSE #1

as a note, yabasic compiles really easily to a single file.
for something a bit more ambitious, freebasic works ootb and integrates well with geany, although it has some annoying aspects lprint should work. maybe a candidate for a .rpm

Offline dougmack

  • Hero Member
  • *****
  • Posts: 961
Re: bwbasic
« Reply #23 on: May 22, 2011, 12:43:29 PM »
Thanx, folks. I didn't really use the word "output" in my test, I just wrote it in my example, not realizing that it was a reserved word.

I've heard of freebasic, but it's not in the repo.  Should I try and get it?  I only need one, and it should be as near to GWBASIC as possible.
I really don't care if you can compile it.  Nothing I have seen is big enough to be worth compiling, and it's certainly faster to troubleshoot
if you don't.

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: bwbasic
« Reply #24 on: May 23, 2011, 01:34:48 AM »
FreeBasic 'aims' to be compatible with QuickBasic and as such will build and compile nice little executables. Easy to install as the installer just copies files around and uninstalls as well.

But for your purposes not compatible with GWBasic so stick with bwbasic.

Which puts me in reminising mode.

In the 1980's there was a "clone" of GWbasic I think it was called Prado-Basic, hailed as good as GWbasic, you could download from bulletin boards, lots of the shareware people would include it on software disks.
So good because it was GWBasic, hacked to remove the credits which were replaced with
"If you find this useful send $10 to......." 
Good Scam.

Offline dougmack

  • Hero Member
  • *****
  • Posts: 961
Re: bwbasic
« Reply #25 on: May 23, 2011, 01:54:26 AM »
I hadn't heard of that. I love it!   -doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley