alimanam3386 Active Member Licensed User Longtime User May 2, 2020 #1 Hi , I have bellow code in a module : B4X: Public Sub GetShareLink As String #if GOOGLE Return "https://play.google.com/store/apps/details?id=..." #Else Return "https://cafebazaar.ir/app/..." #End If End Sub also in Build Configurations I defined two configuration ( GOOGLE AND OTHER ) but when I try to call this sub ( GetShareLink ) always I get same result ( "https://cafebazaar.ir/app/..." ) even when I change the build configuration to OTHER OR GOOGLE I get same result , why ? Last edited: May 2, 2020
Hi , I have bellow code in a module : B4X: Public Sub GetShareLink As String #if GOOGLE Return "https://play.google.com/store/apps/details?id=..." #Else Return "https://cafebazaar.ir/app/..." #End If End Sub also in Build Configurations I defined two configuration ( GOOGLE AND OTHER ) but when I try to call this sub ( GetShareLink ) always I get same result ( "https://cafebazaar.ir/app/..." ) even when I change the build configuration to OTHER OR GOOGLE I get same result , why ?
angel_ Well-Known Member Licensed User Longtime User May 2, 2020 #2 Try this: B4X: Public Sub GetShareLink As String #if GOOGLE Return "https://play.google.com/store/apps/details?id=..." #Else if NOT(GOOGLE) Return "https://cafebazaar.ir/app/..." #End If End Sub Upvote 0
Try this: B4X: Public Sub GetShareLink As String #if GOOGLE Return "https://play.google.com/store/apps/details?id=..." #Else if NOT(GOOGLE) Return "https://cafebazaar.ir/app/..." #End If End Sub
alimanam3386 Active Member Licensed User Longtime User May 2, 2020 #3 angel_ said: Try this: B4X: Public Sub GetShareLink As String #if GOOGLE Return "https://play.google.com/store/apps/details?id=..." #Else if NOT(GOOGLE) Return "https://cafebazaar.ir/app/..." #End If End Sub Click to expand... Not difference Upvote 0
angel_ said: Try this: B4X: Public Sub GetShareLink As String #if GOOGLE Return "https://play.google.com/store/apps/details?id=..." #Else if NOT(GOOGLE) Return "https://cafebazaar.ir/app/..." #End If End Sub Click to expand... Not difference
angel_ Well-Known Member Licensed User Longtime User May 2, 2020 #4 How do you have build configurations? Upvote 0
alimanam3386 Active Member Licensed User Longtime User May 2, 2020 #5 I forgot to add conditional symbols . Now it works. thank you Upvote 0
alimanam3386 Active Member Licensed User Longtime User May 2, 2020 #6 I confused It worked once but now I still have problem with that again! Attachments TEST.zip TEST.zip 8.2 KB · Views: 456 Upvote 0
angel_ Well-Known Member Licensed User Longtime User May 2, 2020 #7 Check the attachment Attachments test.zip test.zip 8.2 KB · Views: 421 Upvote 0
alimanam3386 Active Member Licensed User Longtime User May 2, 2020 #8 angel_ said: Check the attachment Click to expand... works nice thanks , so we should not separate the conditional symbols with comma for any build configuration right ? Upvote 0
angel_ said: Check the attachment Click to expand... works nice thanks , so we should not separate the conditional symbols with comma for any build configuration right ?
angel_ Well-Known Member Licensed User Longtime User May 2, 2020 #9 alimanam3386 said: works nice thanks , so we should not separate the conditional symbols with comma for any build configuration right ? Click to expand... No, por example if you want this B4X: #If NO_ADS #if GOOGLE Return "https://play.google.com/store/apps/details?id=com.porshesoft.oneaye" #Else Return "https://cafebazaar.ir/app/com.porshesoft.oneaye" #End If #Else Return "https://..." #End If GOOGLE: GOOGLE, NO_ADS CAFEBAZAAR: CAFEBAZAAR, NO_ADS Upvote 0
alimanam3386 said: works nice thanks , so we should not separate the conditional symbols with comma for any build configuration right ? Click to expand... No, por example if you want this B4X: #If NO_ADS #if GOOGLE Return "https://play.google.com/store/apps/details?id=com.porshesoft.oneaye" #Else Return "https://cafebazaar.ir/app/com.porshesoft.oneaye" #End If #Else Return "https://..." #End If GOOGLE: GOOGLE, NO_ADS CAFEBAZAAR: CAFEBAZAAR, NO_ADS