<div dir="ltr">Ah, I see your point now.<br><br>I will implement the functions discussed previously then.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 23, 2014 at 11:15 AM, Federico Schwindt <span dir="ltr"><<a href="mailto:fgsch@lodoss.net" target="_blank">fgsch@lodoss.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">In this case they will be just casts or we can have the expression edited to add the conversion.<br><br>
My only concern is that this will add several type X to type Y functions and we will have 2 different idioms, e.g. std.real() vs std.real2time(). The first assumes string, the other not.<br>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 23, 2014 at 11:07 AM, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In message <<a href="mailto:CAJV_h0ZYBgiT-rNuUgcsN7fOX4ENJ1L0wDcvGccDqn63fXxq_A@mail.gmail.com" target="_blank">CAJV_h0ZYBgiT-rNuUgcsN7fOX4ENJ1L0wDcvGccDqn63fXxq_A@mail.gmail.com</a>><br>
, Federico Schwindt writes:<br>
>--f46d044402f401155b04fc7df6fc<br>
>Content-Type: text/plain; charset=UTF-8<br>
<div>><br>
>I was thinking we edit the expression in vcc instead of erroring with<br>
>"Wrong argument type" if formats don't match.<br>
>Allowed conversions would be:<br>
><br>
>TIME to REAL and INT<br>
>REAL to TIME and INT<br>
>INT to TIME and REAL<br>
><br>
>I believe it would be relatively easy but do we want it?<br>
<br>
</div>The point here is that you have no way to ask for REAL variable<br>
in the first place, so how will you trigger the conversion ?<br>
<br>
I'd rather stick with the current (simple) rule that the only<br>
implicit conversions are to STRING, everything else must be<br>
commanded.<br>
<div><div><br>
<br>
--<br>
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG | TCP/IP since RFC 956<br>
FreeBSD committer | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>