-->
Page 1 of 2

Hidden commands / features

PostPosted: Sat Oct 29, 2016 6:35 pm
by Luc Volders
I did not know where to post this so I hope MMISCOOL and other develloppers will read this.

So I was strolling around on a website and found this:

Normally to print something to a webpage we use the wprint command like

Code: Select allwprint "<h1>Test</h1>"


Now I saw the following code:

Code: Select allhtml | <h1>Demo</h1>|


So the guy was not using the wprint command but used html as a command.
Naturally I had to try it and indeed it worked. So you can substitute wprint with html and visa versa.

Wonder what more is hidden in ESP-Basic.

Luc

Re: Hidden commands / features

PostPosted: Mon Oct 31, 2016 6:44 am
by PhilTilson
It's interesting that the HTML command isn't in the documentation at all! I didn't remember putting it in my 'printed' version, so checked through Michael's on-line version and there's no mention of it.

As you say, one wonders what else is there. I did try win.lottery(4,5,12,23,31) but it didn't work....:-)

As a serious point for Michael, is there anywhere that the details of new releases, including any new commands, are formally documented? In order to try to keep my printed documentation up to date, I try to scan through forum messages etc, but it would be really useful if there were somewhere that each new release was detailed. Perhaps there is, and I just don't know where to find it!

Phil

Re: Hidden commands / features

PostPosted: Mon Oct 31, 2016 4:19 pm
by Mmiscool
It seems that an audit of all the commands and the documentation might be in order.

The commands.ino file and the eval.ino file are the 2 places in the source code that would have to be looked at.

I have been a bit bussy lately but think it would be valuable to do.

I try as hard as i can to keep the docs up to date. As for the html command. It is 100% interchangeable with the wprint command.

Re: Hidden commands / features

PostPosted: Mon Oct 31, 2016 5:24 pm
by Electroguard
Mmiscool did post earlier in the year about the equivalent wprint and html commands being due to one of them being degraded but still retained for backwards compatability, although it wasn't mentioned which was superceding the other - and because they were interchangeable it didn't matter anyway, so long as one wasn't dropped mid version.

Considering how far Esp_Basic has evolved it's not surprising it still has an odd wrinkle, and at the end of the day I'm just thankful of what mmiscool has given us - warts n all - but seeing as the subject has been raised, here's some thoughts about the "printy" things...

Wprint sounds like it should be jostling with print and serialprint, which already don't sit comfortably with each other - along with its accompanying serialprintln, serialprint does exactly what one would expect, whereas Print includes terminating <CR/LF> as well as an underscore line (useful, but annoying except in small doses).

So it's the 'Print' command which has the most dinosaur DNA and may be the best candidate for a facelift, and perhaps it might be possible to kill 2 pterodactyls with 1 stone by re-asigning the Print functionality to Wprint.
That would free up Print to just send output to browser and serial but without adding the <CR/LF> or underscore line. A new accompanying PrintLn command could similarly send output to browser and serial plus <CR/LF>.

The html name seems to better represents the commands capabilities of sending html codes to a web page than does wprint (plus it is 1 less character to type!). Just some thoughts, for whatever they're worth.