Alen Hopek
2006-01-18 17:46:58 UTC
Hello,
I have a problem with my function here.
The Function read out a Description from a Norton Ghost Image File.
This works mostly with this Function. The Problem is when i try
to return the value "Chars" out of my function at the end of the
Function like:
...
FUNCTION = Chars
END FUNCTION
then i get an Error:
Relational operator expected
Line 230: FUNCTION = Chars
when i try it like this:
FUNCTION = LEN(Char)
the function returns a numeric value.
The Return Value of this function should be the Variable "Chars".
Any Idea what went wrong ?
Greetings
Alen Hopek
FUNCTION read_gho_description(ghofile AS ASCIIZ * 50) AS LONG
LOCAL Chars AS ASCIIZ * 255
LOCAL start, ende, laenge AS INTEGER
start = &h100
ende = &h1FE
laenge = ende - start
OPEN "C:\" + ghofile FOR BINARY AS #1
SEEK #1, start
GET$ #1, laenge, Chars
REPLACE CHR$(0) WITH CHR$(32) IN Chars
CLOSE #1
FUNCTION = LEN(Chars)
END FUNCTION
I have a problem with my function here.
The Function read out a Description from a Norton Ghost Image File.
This works mostly with this Function. The Problem is when i try
to return the value "Chars" out of my function at the end of the
Function like:
...
FUNCTION = Chars
END FUNCTION
then i get an Error:
Relational operator expected
Line 230: FUNCTION = Chars
when i try it like this:
FUNCTION = LEN(Char)
the function returns a numeric value.
The Return Value of this function should be the Variable "Chars".
Any Idea what went wrong ?
Greetings
Alen Hopek
FUNCTION read_gho_description(ghofile AS ASCIIZ * 50) AS LONG
LOCAL Chars AS ASCIIZ * 255
LOCAL start, ende, laenge AS INTEGER
start = &h100
ende = &h1FE
laenge = ende - start
OPEN "C:\" + ghofile FOR BINARY AS #1
SEEK #1, start
GET$ #1, laenge, Chars
REPLACE CHR$(0) WITH CHR$(32) IN Chars
CLOSE #1
FUNCTION = LEN(Chars)
END FUNCTION