It is currently Mon Apr 24, 2017 11:59 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Any chance to fix this old string problem?
PostPosted: Wed Apr 06, 2016 8:31 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 18, 2004 9:52 am
Posts: 415
Location: Penang, Malaysia
Code:
Procedure$ JoinString_Private(first$, second$ = "")
  ProcedureReturn first$ + " " + second$
EndProcedure

ProcedureDLL$ JoinString(first$)
  ProcedureReturn JoinString_Private(first$)
EndProcedure

ProcedureDLL$ JoinString2(first$, second$)
  ProcedureReturn JoinString_Private(first$, second$)
EndProcedure



Code:
Debug JoinString("A", JoinString("F", "H"))    ; Output is F H instead of A F H


Top
 Profile  
Reply with quote  
 Post subject: Re: Any chance to fix this old string problem?
PostPosted: Wed Apr 06, 2016 8:53 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Oct 16, 2009 10:12 am
Posts: 528
Location: BE
You used the wrong one.

Debug JoinString2("A", JoinString2("F", "H"))

_________________
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.


Top
 Profile  
Reply with quote  
 Post subject: Re: Any chance to fix this old string problem?
PostPosted: Thu Apr 07, 2016 12:03 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 18, 2004 9:52 am
Posts: 415
Location: Penang, Malaysia
Joris,
This will not work because JointString2 is already compiled with TailBite so it cannot be detected. :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: Any chance to fix this old string problem?
PostPosted: Thu Apr 07, 2016 12:21 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Jun 01, 2012 12:20 am
Posts: 118
I don't have Tailbite here.

Should you pelase confirm the problem with the following code?

Code:
Procedure$ JoinString_Private(first$, second$)
  ProcedureReturn first$ + " " + second$
EndProcedure

ProcedureDLL$ JoinString(first$)
  ProcedureReturn JoinString_Private(first$, "")
EndProcedure

ProcedureDLL$ JoinString2(first$, second$)
  ProcedureReturn JoinString_Private(first$, second$)
EndProcedure


Top
 Profile  
Reply with quote  
 Post subject: Re: Any chance to fix this old string problem?
PostPosted: Sun Apr 10, 2016 1:27 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 18, 2004 9:52 am
Posts: 415
Location: Penang, Malaysia
Tailbite the longer code with the latest then run the debug example.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye