QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Ryster on March 02, 2021, 01:58:39 pm

Title: name already in use...
Post by: Ryster on March 02, 2021, 01:58:39 pm
Hello.
Can anything be done about this problem?. Must it be like this for eternity.
S# =
Title: Re: name already in use...
Post by: FellippeHeitor on March 02, 2021, 02:00:44 pm
First time I see this report. Hate the tone tho.

Thanks for reporting anyway.
Title: Re: name already in use...
Post by: FellippeHeitor on March 02, 2021, 02:12:33 pm
Please confirm the problem exists in the latest stable version, report the operating system you're using and if it's qb64 64bit or 32bit.

Also, please describe the issue.
Title: Re: name already in use...
Post by: SpriggsySpriggs on March 02, 2021, 02:12:51 pm
@Ryster

I am not able to replicate your issue.
Title: Re: name already in use...
Post by: Ryster on March 02, 2021, 02:28:38 pm
SMcNeill knows what I mean. It disturbs me in programming (you must always remember). Perhaps it cannot be improved.
Title: Re: name already in use...
Post by: FellippeHeitor on March 02, 2021, 02:31:55 pm
Let's leave it to Steve then.
Title: Re: name already in use...
Post by: bplus on March 02, 2021, 03:15:41 pm
Hello.
Can anything be done about this problem?. Must it be like this for eternity.
S# =

I confirm Spriggsy's confirmation, no problem in V 1.5

So eternity is over unless on another OS, NOT( Widows 10-64 ) and it's misbehaving there.

Here's how to throw a name in use error:
Code: QB64: [Select]
Title: Re: name already in use...
Post by: SMcNeill on March 02, 2021, 03:32:55 pm
Let's leave it to Steve then.

I’m not even certain what we’re leaving to Steve, but you’re welcome to leave it with me.  I’m more than able to leave it as well.

What name is already in use?  S#? 

I’m lost...  Somebody fetch me some source code, in code blocks, that I can copy/paste in the IDE and see an error message from.
Title: Re: name already in use...
Post by: FellippeHeitor on March 02, 2021, 03:41:34 pm
😂
Title: Re: name already in use...
Post by: Dav on March 02, 2021, 05:02:00 pm
Do you have a SUB or FUNCTION named S, and are making a variable name S# somewhere else?  IF so then that error will occur.  Like this, will not work..

S# =   '<<< name already is use error

SUB S
END SUB

- Dav
Title: Re: name already in use...
Post by: SpriggsySpriggs on March 02, 2021, 05:07:59 pm
@Ryster Sounds like you have some debugging to do on your end or to simply not use S# as your variable name as you are most likely using S somewhere else in your code as others have pointed out. This isn't something to fix on the QB64 side. It just takes you looking through your code and doing basic troubleshooting. I await your update on whether or not you have solved the issue.
Title: Re: name already in use...
Post by: Petr on March 02, 2021, 05:14:56 pm
Who uses the same name for a variable as for a SUB or function name? This really isn't an IDE bug..... :)
Title: Re: name already in use...
Post by: euklides on March 03, 2021, 03:16:49 am
No problem with
S#=1
Works fine.
Title: Re: name already in use...
Post by: Petr on March 03, 2021, 02:26:42 pm
@BSpinoza

Code: QB64: [Select]
  1. S# = 10
  2.  
  3. SUB S
  4.     PRINT "SUB S is running..."
  5.  

But really, this is NOT QB64 problem :)
Title: Re: name already in use...
Post by: SMcNeill on March 03, 2021, 03:04:28 pm
@BSpinoza

Code: QB64: [Select]
  1. S# = 10
  2.  
  3. SUB S
  4.     PRINT "SUB S is running..."
  5.  

But really, this is NOT QB64 problem :)

But is this even the original problem?  Ryster didn’t leave much code, or any real discription of what’s wrong.  People are just shooting blind in the dark, trying to reproduce the issue he described.

My blind shot would be with:

CONST S = 92955828 ‘distance to sun, in miles

S# = ERROR: NAME ALREADY IN USE



Without followup code and a more detailed explanation, we may as well be trying to answer, “How many licks does it take to get to the center of a tootsie pop?”

Title: Re: name already in use...
Post by: Petr on March 03, 2021, 03:10:52 pm
Steve, you are right AGAIN :)
Title: Re: name already in use...
Post by: Petr on March 03, 2021, 03:16:17 pm
I use older IDE (but with MEMSOUND support) and returned bug message for your example is not "Name already in use" but "Expected variable = " but definitely, the description of the error at the beginning of the thread is actually very insufficient.
Title: Re: name already in use...
Post by: bplus on March 03, 2021, 06:32:30 pm
Does the tootsie have to be completely exposed or is it just first discovery? ;-))
Title: Re: name already in use...
Post by: Pete on March 04, 2021, 10:52:36 pm
And don't forget to tune in next week for another exciting episode of, "Leave it to Stever!"

In next weeks episode, someone leaves a copy of FreeBASIC on Steve's porch, and sets it on fire!

Pete