BBC BASIC for Windows
« Returning reference from a function »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:10pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Returning reference from a function  (Read 447 times)
Kirkkaf13
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 28
xx Returning reference from a function
« Thread started on: Dec 15th, 2015, 4:16pm »

Hello,

I appear to be stuck again with another simple problem. This time I have defined a function in a library file and called it from my program.

The interpreter is returning an error "No such variable in module".

I believe it has something to do with the LOCAL variable I am using but I cannot seem to figure it out after reading the tutorial and documentation on procedures and functions.

Code:
      DEF FN_get_window_title
      LOCAL title%
      DIM title% LOCAL 1000
      SYS "GetWindowText", @hwnd, title%, 1000
      = $$title%


      PRINT FN_get_window_title
 


What am I doing wrong?

Thank you.
User IP Logged

hellomike
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Returning reference from a function
« Reply #1 on: Dec 15th, 2015, 6:08pm »

@hwnd%
User IP Logged

Kirkkaf13
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 28
xx Re: Returning reference from a function
« Reply #2 on: Dec 15th, 2015, 6:47pm »

on Dec 15th, 2015, 6:08pm, hellomike wrote:
@hwnd%


Hello hellomike,

I knew it was something simple! I wish the error messages were more informative.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls