FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour vocabulary book for Harbor / Javascript
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
vocabulary book for Harbor / Javascript
Posted: Tue Jan 07, 2020 08:43 AM

Good morning.
Every student who starts learning a foreign language begins with a vocabulary book.
I think we also need a vocabulary book for Harbor / Javascript.
What do you think?

Best regards
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: vocabulary book for Harbor / Javascript
Posted: Tue Jan 07, 2020 08:45 AM

The vocabulary booklet should show for the most common problems how to do this with HTML and javascript.
I also mean simple things like STRTRAN, STR, INT, etc. and e.g., calling functions with parameters, etc.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: vocabulary book for Harbor / Javascript
Posted: Tue Jan 07, 2020 08:50 AM
Andreu;
str
-> value.toString()
int
-> parseInt(value)

strtran



currently the only easy way to do strtran is if you can turn the string to search for into a regexp pattern
since str.replace(search, replace) will only replace the first match

you can even do parseInt(value, 16) for parsing as hex



but there's a replaceAll method going through the rounds, and it'll hopefully land this year



https://github.com/tc39/proposal-str ing-rep laceall

Continue the discussion