Replace printf() with plain list echo

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Replace printf() with plain list echo

Rafael Chacón
Hi,

When i was fixing SupplierInquiry.php, I had to replace printf() with plain list echo using single-quotes. The reason is that printf() uses % characters as "special" characters (e.g. when the text to print has a ""Includes a 25% discount" character).

Also, I replaced  printf() with plain list echo using single-quotes in Dashboard.php and SupplierPriceList.php.

The results are: less lines, a little less time, and "more readable" code. The last one, is my personal opinion.

If all agree, it is better to continue using a plain list echo using single-quotes instead a printf().

Comments ?

Best regards, Rafael.



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Replace printf() with plain list echo

phildaintree

Relaxed either way ... its a Do-ocracy

https://communitywiki.org/wiki/DoOcracy

Phil

On 2016-11-06 13:23, Rafael Chacón wrote:

> Hi,
>
> When i was fixing SupplierInquiry.php, I had to replace printf() with
> plain list echo using single-quotes. The reason is that printf() uses
> % characters as "special" characters (e.g. when the text to print has
> a ""Includes a 25% discount" character).
>
> Also, I replaced  printf() with plain list echo using single-quotes in
> Dashboard.php and SupplierPriceList.php.
>
> The results are: less lines, a little less time, and "more readable"
> code. The last one, is my personal opinion.
>
> If all agree, it is better to continue using a plain list echo using
> single-quotes instead a printf().
>
> Comments ?
>
> Best regards, Rafael.
>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
If anyone is wondering about the persistently nasty comments made by Tim Schofield and wants the full story please see: http://timschofield.blogspot.com/ Hell hath no fury like a woman (or Tim) scorned
Loading...