05-21-2025, 11:42 PM
Hi Dano
here screenshot that confirms affirmations of Bplus
I dunno if compiler must control this kind of data type with distinguish between fixed string and string.
In the same manner if you declare into the Function a SHARED variable, the compiler doesn't test if there is a same variable into main, but I dunno if this is a must for the compile... surely you can bypass this problem using Option _explicit at top of your code.
![[Image: String-parameters-to-funciton-issue-by-Bplus.jpg]](https://i.ibb.co/0R55s6Mt/String-parameters-to-funciton-issue-by-Bplus.jpg)
So for now you cannot have this information directly from parameters of function!
Please say me:
I have 2 question for you:
1. if it is difficult to add a parameter to the SUB/FUNCTION , is it difficult too to add a SHARED variable into it?
2. what is the goal to distinguish between Fixed and Variable lenght ?
Code: (Select All)
Dim GlobalString$, GlobalFixedString$7
GlobalString$ = "123456789012345"
GlobalFixedString$7 = "1234567890"
Print "Global variable", "In function variable" + " Kind 0=fixed/ -1=variable"
Print GlobalString$, WhatKindOfString%(GlobalString$)
Print GlobalFixedString$7, , WhatKindOfString%(GlobalFixedString$7)
End
Function WhatKindOfString% (FunctionString$5)
'-1 = Fixed lenght, 0 = variable lenght
Print FunctionString$5, ;
If Len(FunctionString$5) > 7 Then WhatKindOfString% = -1 Else WhatKindOfString% = 0
End Function
here screenshot that confirms affirmations of Bplus
I dunno if compiler must control this kind of data type with distinguish between fixed string and string.
In the same manner if you declare into the Function a SHARED variable, the compiler doesn't test if there is a same variable into main, but I dunno if this is a must for the compile... surely you can bypass this problem using Option _explicit at top of your code.
![[Image: String-parameters-to-funciton-issue-by-Bplus.jpg]](https://i.ibb.co/0R55s6Mt/String-parameters-to-funciton-issue-by-Bplus.jpg)
So for now you cannot have this information directly from parameters of function!
Please say me:
I have 2 question for you:
1. if it is difficult to add a parameter to the SUB/FUNCTION , is it difficult too to add a SHARED variable into it?
2. what is the goal to distinguish between Fixed and Variable lenght ?