IsCallTime checks the format of the string and returns true if it is in the form of H:MM:SS, MM:SS or M:SS NumberOfSecondsInCallTime converts the call time to seconds 'callTime$ has only the seconds printed to the screen. it is passed properly to the function that changes it into seconds and it works properly in IsCallTime but it won't print out properly. why?
Title: Re: is this a buig, am I blind or do I just not know something abiout the code?
Post by: bplus on March 06, 2022, 02:28:47 pm
Where you have S$ do you mean Str$?
Title: Re: is this a buig, am I blind or do I just not know something abiout the code?
Post by: Jaze on March 06, 2022, 03:11:15 pm
yeah, sorry. s$(number) is just s short form ltrim$(str$(number)) -- I use it a lot
Title: Re: is this a buig, am I blind or do I just not know something abiout the code?
Post by: bplus on March 06, 2022, 03:23:26 pm
Yeah I have a shortcut for that too.
Be nice if we had all the needed subs and functions but could get even more confusing...
Your variable naming is admirably descriptive, but I am having a hard time cutting to chase of problem stumbling over all those syllables.
Have you run this thing through Option _Explicit? so easy for typo and all...
Title: Re: is this a buig, am I blind or do I just not know something abiout the code?
Post by: Jaze on March 06, 2022, 03:42:22 pm
no. I actually just passed the MID$ instead of putting it in a variable first. I just would like to know wtf is happening
using the long variable names makes it easier to se typos as they occur. if the case doesn't get set correctly after a moment I immediately know I have a typo
Title: Re: is this a buig, am I blind or do I just not know something abiout the code?
Post by: SMcNeill on March 06, 2022, 03:42:56 pm
If I had to guess without seeing the subs, I'd think you're probably dealing with parameter corruption. Remember -- subs can pass values BACK as well as receive them.
SUB foo (x$) x$ = "cheese" END SUB
Doesn't matter what x$ was before the call to foo above -- it's cheese afterwards!
To preserve the variable without changing it:
SUB foo (passedX$) x$ = passedX$ 'local use, non-return variable x$ = "cheese" END SUB
In the above, we assign our passed value to a local variable and work with that variable. No matter how much it changes in SUB, it never affects the value of the original.
Title: Re: is this a buig, am I blind or do I just not know something abiout the code?
Post by: bplus on March 06, 2022, 06:13:58 pm
Everything seems to work when I plug in dummy functions so Steve may be correct.