Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Return Value of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 174 of 266
Post > Topic >>

Return Value of Function ?!?!

by Alen Hopek <alen.hopek@[EMAIL PROTECTED] > Jan 18, 2006 at 06:46 PM

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




 3 Posts in Topic:
Return Value of Function ?!?!
Alen Hopek <alen.hopek  2006-01-18 18:46:58 
Re: Return Value of Function ?!?!
buck huffman <no@[EMAI  2006-01-18 13:27:26 
Re: Return Value of Function ?!?!
"Greg Neill" &l  2006-01-18 13:26:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 13:14:12 CDT 2008.