Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / #constant in string

Author
Message
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Dec 2007 22:54
This:
open to write 1,"test.txt"
write string 1,"#constant TEST 1"
write string 1,str$(TEST)
close file 1

Should write this to a file:
#constant TEST 1
0

Whereas it actuall writes this:
#constant TEST 1
1

because it reads the constant within the string. For my program, it meant I had to do this:
write string 1,chr$(35)+"constant <const> <val>"

Dr Schnitzengruber
16
Years of Service
User Offline
Joined: 19th Jul 2007
Location: C:/Projects/failed/ schnitzengruber
Posted: 21st Dec 2007 00:47
This is a Error!! I tried this code:



and got a build error. But when I take out a o:



It works fine. The compilier is definitly interpreting that as a constant declaration.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Dec 2007 11:14
@Dr Schnitzengruber
Yes, my actual problem was that I had some constants defined, and in the saving routine (it saves .dba code) it was writing out those same constants, causing DBP to say that I was redfining them

Login to post a reply

Server time is: 2024-05-04 07:13:02
Your offset time is: 2024-05-04 07:13:02