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.

Author
Message
MrTAToad
17
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Sep 2002 12:44
one$ AS STRING compiles but when running the program causes a 'memory could not be written'.

Is AS STRING valid (or cant strings be pre-defined yet) ?
Yes, I really am THAT good...
Washington Irving
17
Years of Service
User Offline
Joined: 7th Sep 2002
Location:
Posted: 17th Sep 2002 16:45
doesn't the $ make the "as string" redundant?

i have found when defining types:

TYPE mytype
one as string
END TYPE

is valid

MrTAToad
17
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Sep 2002 16:49
The $ does make it redundent - however, the same message occurs without one...

Yes, I really am THAT good...
dbellis
17
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 18th Sep 2002 09:25
strings seem to work for me no problem if im thinking right you mean sommet like

input "whats Your Name";name$

Print "Hello There ";name$

witch works perfect

http://www.eclipsedevelopment.co.uk/
Succession The Betrayal Developer
MrTAToad
17
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Sep 2002 12:18
I must admit I cant get the same problem to happen again at the moment - I'll have to try it again at home - so I'll put it down to my DLL overwriting memory.

However, in the following :

one AS BYTE

one=1
while one>0
print "This will be ignored"
endwhile

the print statement will never be printed

Yes, I really am THAT good...
dbellis
17
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 18th Sep 2002 18:25
you are not telling the while statement to start printing
its just set at 0 and you are not defing what to do when to stop either
one=1
while one<>-1
Print "Did It Work"
endwhile

try that and see if it works

http://www.eclipsedevelopment.co.uk/
Succession The Betrayal Developer
waffle
17
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 18th Sep 2002 18:56
i wonder if by setting your byte to 1
if DB thinks that this is a negative number.
Most binary math assumes the first bit is a sign bit.
try setting your byte to 0001, or am i missing something here.....

maybe in your campare statement you must compare 2 bytes,
not a byte and an Integer. Seems like they should be compatible though doesn't it.
MrTAToad
17
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Sep 2002 19:00
No, that doesn't work either - it appears that the comparison statements can only compare 2+ bytes.

Yes, I really am THAT good...

Login to post a reply

Server time is: 2019-11-13 19:46:49
Your offset time is: 2019-11-13 19:46:49