Strzero function.

91 views
Skip to first unread message

RyszardR

unread,
Oct 15, 2025, 1:37:35 AM (2 days ago) Oct 15
to Harbour Users
Is this a bug ?

?  STRZERO(5, 2, 4)  -> **
?  STRZERO(5, 2)     -> 05
strzero(5,2,4) should return 05.0000 !

Regards.

RyszardR

unread,
Oct 15, 2025, 1:40:44 AM (2 days ago) Oct 15
to Harbour Users
OK. I found the problem.
Should be strzero(5,4,2)
Regards.

Ricardo - gmail -

unread,
Oct 15, 2025, 7:48:55 AM (2 days ago) Oct 15
to harbou...@googlegroups.com, RyszardR
Hi, try this code

clear


@ 0,0 say '? str(5,2,4) -> ' + str(5,2,4)
@ 2,0 say '? str(5,7,4) -> ' + str(5,7,4)

@ 4,0 say '? strzero(5,2,4) -> ' + strzero(5,2,4)
@ 6,0 say '? strzero(5,7,4) -> ' + strzero(5,7,4)

@ 8,0 say 'The second parameter is the total lenght'

wait

quit

I hope it answer your question

Regards

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/fb4cc2f5-f027-44cf-bce3-59eab096f6b3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages