QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: xra7en on July 21, 2018, 10:49:32 pm

Title: can user created qbasic functions return a string?
Post by: xra7en on July 21, 2018, 10:49:32 pm
Code: QB64: [Select]
  1. FUNCTION QUAD_NAME (X, Y, Z AS INTEGER)  
  2. QUAD_NAME = string_var
  3.  
returns a "illegal string-number conversion"

I checked the in IDE help on function command(currently using QB64, but their wiki is down), but no information as to whether it can return a string. currently I am using a global var to assign the quad_name but would prefer to use a function to return the desired var.

thanks for helping
Title: Re: can user created qbasic functions return a string?
Post by: Gets on July 21, 2018, 11:12:55 pm
Rename it QUAD_NAME$

Title: Re: can user created qbasic functions return a string?
Post by: xra7en on July 22, 2018, 12:05:55 am
oops got it

Changing both the function var and the return far with a "$" did the trick



thanks again!