<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.19431"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=087470719-19022020><FONT color=#0000ff 
size=2 face=Arial>Touché :-).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=087470719-19022020><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=087470719-19022020><FONT color=#0000ff 
size=2 face=Arial>So therefore, perhaps, it would be better to say '<FONT 
color=#000000 face="">we don't have wide strfromd functions</FONT>' because they 
are neither widely used nor implemented consistently (I'd never heard of them 
before this discussion) and it is clearer and more likely to be understood if 
the programmer simply uses strnprintf ...?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=087470719-19022020><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=087470719-19022020><FONT color=#0000ff 
size=2 face=Arial>Mike</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=087470719-19022020><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> Rajan Bhakta [mailto:rbhakta@us.ibm.com] 
  <BR><B>Sent:</B> 19 February 2020 18:16<BR><B>To:</B> Mike 
  Cowlishaw<BR><B>Cc:</B> 'CFP'<BR><B>Subject:</B> Re: [Cfp-interest 1496] Re: 
  AI item to submit proposal about why no wide string strfrom 
  functions<BR></FONT><BR></DIV>
  <DIV></DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">Hi 
  Mike,</SPAN><BR><BR><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">I 
  think the point of the example was explicitly to say why we don't have wide 
  strfromd functions, so it really makes sense to keep strfromd 
  there.</SPAN><BR><BR><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">Regards,<BR><BR>Rajan 
  Bhakta<BR>z/OS XL C/C++ Compiler Technical Architect<BR>ISO C Standards 
  Representative for Canada, PL22.11 Chair (USA)<BR>C Compiler 
  Development<BR>Contact: rbhakta@us.ibm.com, Rajan 
  Bhakta/Houston/IBM</SPAN><BR><BR><BR><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">From: &nbsp; 
  &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">"Mike Cowlishaw" 
  &lt;mfc@speleotrove.com&gt;</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">To: &nbsp; 
  &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">"'CFP'" 
  &lt;cfp-interest@ucbtest.org&gt;</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Date: &nbsp; 
  &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">02/19/2020 11:49 
  AM</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Subject: 
  &nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">[EXTERNAL] [Cfp-interest 1496] 
  Re: AI item to submit proposal about why no &nbsp; &nbsp; &nbsp; &nbsp;wide 
  string strfrom functions</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Sent by: 
  &nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">cfp-interest-bounces@oakapple.net</SPAN><BR>
  <HR noShade>
  <BR><BR><BR><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; COLOR: blue">Hmm, given the 
  uncertainty about </SPAN><BR><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New; COLOR: blue"><B>int nc = 
  strfromd(s, n, “%g”, d);</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; COLOR: blue">... perhaps just 
  change that line to use </SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New; COLOR: blue"><B>snprintf</B></SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; COLOR: blue">, which has 
  'well-known' behaviour?</SPAN><BR><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; COLOR: blue">Mike</SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;</SPAN><BR><BR>
  <HR>
  <SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><B>From:</B> 
  cfp-interest-bounces@oakapple.net [</SPAN><A 
  href="mailto:cfp-interest-bounces@oakapple.net"><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">mailto:cfp-interest-bounces@oakapple.net</SPAN></A><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">] <B>On Behalf Of </B>Jim 
  Thomas<B><BR>Sent:</B> 05 February 2020 20:11<B><BR>To:</B> Damian 
  McGuckin<B><BR>Cc:</B> CFP<B><BR>Subject:</B> [Cfp-interest 1468] Re: AI item 
  to submit proposal about why no wide string strfrom functions</SPAN><SPAN 
  style="FONT-SIZE: 12pt"><BR></SPAN><BR><SPAN style="FONT-SIZE: 12pt">Here’s an 
  update for the code segment: </SPAN><BR><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>#include 
  &lt;stdlib.h&gt;</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>const size_t n = 
  20;</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>double 
  d;</B></SPAN><BR><SPAN style="FONT-SIZE: 12pt">…</SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>// convert d to 
  single-byte character string s</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>char 
  s[n];</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>int nc = strfromd(s, n, 
  “%g”, d);</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>// convert s (regarded as 
  a multi-byte character </B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>// string) to wide string 
  ws</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>wchar_t 
  ws[n];</B></SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New"><B>(void)mbstowcs(ws, s, 
  n);</B></SPAN><BR><BR><SPAN style="FONT-SIZE: 12pt">On Feb 5, 2020, at 9:55 
  AM, Jim Thomas &lt;</SPAN><A href="mailto:jaswthomas@sbcglobal.net"><SPAN 
  style="FONT-SIZE: 12pt; COLOR: blue"><U>jaswthomas@sbcglobal.net</U></SPAN></A><SPAN 
  style="FONT-SIZE: 12pt">&gt; wrote:</SPAN><BR><BR><SPAN 
  style="FONT-SIZE: 12pt">Probably so. the other code examples in the C standard 
  include all the declarations. Update to follow.<BR><BR>- 
  Jim<BR></SPAN><BR><SPAN style="FONT-SIZE: 12pt">On Feb 4, 2020, at 4:04 PM, 
  Damian McGuckin &lt;</SPAN><A href="mailto:damianm@esi.com.au"><SPAN 
  style="FONT-SIZE: 12pt; COLOR: blue"><U>damianm@esi.com.au</U></SPAN></A><SPAN 
  style="FONT-SIZE: 12pt">&gt; wrote:<BR><BR>On Tue, 4 Feb 2020, Jim Thomas 
  wrote:<BR></SPAN><BR><SPAN style="FONT-SIZE: 12pt">Action item:<BR>&nbsp; 
  &nbsp; &nbsp; &nbsp;Jim: Get a WG14 document number and submit<BR>&nbsp; 
  &nbsp;C2x_proposal_-_why_no_wide_string_strfrom_functions-<BR>&nbsp; 
  &nbsp;20191230.pdf.<BR>The following was submitted to WG14:</SPAN><SPAN 
  style="FONT-SIZE: 12pt; COLOR: blue"><U><BR></U></SPAN><A 
  href="http://wiki.edg.com/pub/CFP/WebHome/n2475.pdf"><SPAN 
  style="FONT-SIZE: 12pt; COLOR: blue"><U>http://wiki.edg.com/pub/CFP/WebHome/n2475.pdf</U></SPAN></A><BR><SPAN 
  style="FONT-SIZE: 12pt"><BR>Do you need a declaration for the wide string 'ws' 
  in that code at the end?<BR><BR>Regards - Damian<BR><BR>Pacific Engineering 
  Systems International, 277-279 Broadway, Glebe NSW 2037<BR>Ph:+61-2-8571-0847 
  .. Fx:+61-2-9692-9623 | unsolicited email not wanted here<BR>Views &amp; 
  opinions here are mine and not those of any past or present 
  employer</SPAN><BR><SPAN 
  style="FONT-SIZE: 12pt"><BR><BR>_______________________________________________<BR>Cfp-interest 
  mailing list</SPAN><SPAN 
  style="FONT-SIZE: 12pt; COLOR: blue"><U><BR></U></SPAN><A 
  href="mailto:Cfp-interest@oakapple.net"><SPAN 
  style="FONT-SIZE: 12pt; COLOR: blue"><U>Cfp-interest@oakapple.net</U></SPAN></A><SPAN 
  style="FONT-SIZE: 12pt"><BR></SPAN><A 
  href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><SPAN 
  style="FONT-SIZE: 12pt">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</SPAN></A><BR><TT><SPAN 
  style="FONT-SIZE: 10pt">_______________________________________________<BR>Cfp-interest 
  mailing list<BR>Cfp-interest@oakapple.net<BR></SPAN></TT><A 
  href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><TT><SPAN 
  style="FONT-SIZE: 10pt">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</SPAN></TT></A><TT><SPAN 
  style="FONT-SIZE: 10pt"><BR></SPAN></TT><BR><BR><BR></BLOCKQUOTE></BODY></HTML>