write one line program
print "x"
call it z.bas
compile it with freebasic
run it like this z > z.txt
if you look at z.txt with a binary editor, you see x cr cr lf
if you compile it with qb45 you see x cr lf
freebasic seems to be adding an extra cr during redirection
Search found 62 matches
- Feb 04, 2007 14:11
- Forum: DOS
- Topic: redirected output has extra cr
- Replies: 0
- Views: 2001
- Jan 25, 2007 14:03
- Forum: DOS
- Topic: regex lib missing ?
- Replies: 1
- Views: 2484
regex lib missing ?
i tried to compile the example program regex_replace.bas with the dos version of freebasic 0.16 and got a loader error ... "cannot find -ltre"
what am i doing wrong?
what am i doing wrong?
- Jan 17, 2007 17:06
- Forum: DOS
- Topic: dir attributes
- Replies: 12
- Views: 6110
dir attributes
Code: Select all
dim as string t
t = dir("*",16)
do
if t = "" then exit do
print t
t = dir()
loop
There appears to be a discrepancy in the docs for DIR. One place it says the directory attribute is 0x8 and another place 0x10.
- Dec 31, 2006 17:44
- Forum: DOS
- Topic: general protection fault
- Replies: 12
- Views: 5810
- Dec 23, 2006 15:20
- Forum: General
- Topic: life after piping to stdin
- Replies: 8
- Views: 1649
- Dec 23, 2006 14:48
- Forum: General
- Topic: life after piping to stdin
- Replies: 8
- Views: 1649
- Dec 23, 2006 14:33
- Forum: General
- Topic: life after piping to stdin
- Replies: 8
- Views: 1649
i'm writing an editor which first reads a file from disk, then receives commands from the keyboard. i thought it would be handy to be able to read the file from stdin instead of disk. this works, but the console remains pointed at the piped input so i am unable to receive editor commands from the ke...
- Dec 23, 2006 13:41
- Forum: General
- Topic: life after piping to stdin
- Replies: 8
- Views: 1649
life after piping to stdin
open cons for input as #1
do while not eof(1)
line input #1, x
print x
loop
close #1
x = inkey
x never sees any chars in the last line.
is there any cure for this?
do while not eof(1)
line input #1, x
print x
loop
close #1
x = inkey
x never sees any chars in the last line.
is there any cure for this?
- Dec 22, 2006 22:03
- Forum: General
- Topic: EOF in stdin?
- Replies: 15
- Views: 4800
reading piped input
open cons for input as #1
do while not eof(1)
line input #1, x
print x
loop
close #1
x = inkey
x never sees any chars in the last line.
is there any cure for this?
do while not eof(1)
line input #1, x
print x
loop
close #1
x = inkey
x never sees any chars in the last line.
is there any cure for this?
- Dec 21, 2006 16:03
- Forum: General
- Topic: profile ... where is gmon.out
- Replies: 4
- Views: 1546
- Dec 21, 2006 15:55
- Forum: General
- Topic: profile ... where is gmon.out
- Replies: 4
- Views: 1546
- Dec 21, 2006 15:22
- Forum: General
- Topic: profile ... where is gmon.out
- Replies: 4
- Views: 1546
profile ... where is gmon.out
I compiled my program with the -profile switch. The exe gets bigger and slower, but I cannot find gmon.out!
- Dec 11, 2006 0:49
- Forum: DOS
- Topic: poking screen of dos box
- Replies: 3
- Views: 2686
poking screen of dos box
i am translating a program from qb45 to freebasic that uses poke to change screen colors thusly
def seg = &hb800
poke 1,&h2e
i expected to be able to translate that into
poke &hb8001,&h2e
but it does not work.
i am working in a dos box (console) of windows xp.
def seg = &hb800
poke 1,&h2e
i expected to be able to translate that into
poke &hb8001,&h2e
but it does not work.
i am working in a dos box (console) of windows xp.
- Dec 08, 2006 15:46
- Forum: DOS
- Topic: trapping control c and control break
- Replies: 6
- Views: 6387
trapping control c and control break
i'm writing a program that should not allow control-c or control-break but it might be handy to trap rather than suppress them. is there any way to do that without 'on error' ?
- Dec 05, 2006 20:25
- Forum: DOS
- Topic: general protection fault
- Replies: 12
- Views: 5810
general protection fault
ok i figured out how to operate the debugger the program does not fail every time when it does fail, it is at a line like this ... type cell as string ptr value as cell ptr prevcell as cell ptr nextcell end type ... btm = callocate(len(cell)) btm->value = callocate(3) *btm->value= "btm"