Page 1 of 1

[No bug] GetURLPart() / SetURLPart()

Posted: Sat Oct 09, 2021 7:43 am
by Little John
see Reference Manual:
https://www.purebasic.com/documentation ... lpart.html
https://www.purebasic.com/documentation ... lpart.html

Parameter is a numerical value, not a string.
So writing "Parameter$" in the documentation is inconsistent and irritating.

Re: [PB 5.73] GetURLPart() / SetURLPart()

Posted: Sat Oct 09, 2021 8:57 am
by Marc56us
Little John wrote: Sat Oct 09, 2021 7:43 am see Reference Manual:
https://www.purebasic.com/documentation ... lpart.html
https://www.purebasic.com/documentation ... lpart.html

Parameter is a numerical value, not a string.
So writing "Parameter$" in the documentation is inconsistent and irritating.
Parameter is a string

Code: Select all

Debug #PB_URL_Protocol  ;  /PC/
Debug #PB_URL_Site      ;  /WS/
Debug #PB_URL_Port      ;  /PO/
:wink:

Re: [PB 5.73] GetURLPart() / SetURLPart()

Posted: Sat Oct 09, 2021 9:19 am
by Little John
Marc56us wrote: Sat Oct 09, 2021 8:57 am Parameter is a string
Ooops. I didn't check that, sorry! :oops:
Thanks for the correction.

I didn't expect that, obviously. It would be better to rename those constants, in order to make it obvious that they are strings:
#PB_URL_Protocol$
#PB_URL_Site$
#PB_URL_Port$
etc.

Re: [PB 5.73] GetURLPart() / SetURLPart()

Posted: Fri Mar 10, 2023 10:30 pm
by Andre
Little John wrote: Sat Oct 09, 2021 9:19 am I didn't expect that, obviously. It would be better to rename those constants, in order to make it obvious that they are strings:
#PB_URL_Protocol$
#PB_URL_Site$
#PB_URL_Port$
etc.
Maybe ;-)

But that would be up to Fred (changing the PB constants with '$' suffix), before there will be a change in the docs.