๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #180633

Java has no macros ! ? I couldn't use it.

#180633
From: Jeff_โ„želf
Date: Sat, 18 Feb 2006 02:02
50 lines
2607 bytes
Hi  Ghost,  Speaking of X.CPP,  You wrote:

  I now count macrodefs from line 23 to line 154.
  A lot of L"" constructs; the C++ constructs
  ...
  I count 132 lines of macrodefs.  Many of these are multiline.

That's correct, 132 * 100 / 2,077  is 6.4 percent of the file.
Maybe I should shoot for a full ten percent.
Java has no macros ! ?  I couldn't use it.

X.EXE now has Outlook's MLang, so it can decode a wide variety of charsets,
and it writes UTF-8 by default, using Quoted_Words in the headers.

You told me:

  At least you put a proper UTF-16 header (0xFF 0xFE) on the file so 
  that I have a chance of converting it to something vaguely readable.  :-P

Visual_Studio did that -- automatically converting it from ASCII --
when I started playing around with code like:  int ้€€ๅ‡บ = 0 ;

I always write out that magic number when I create .TXT files,
otherwise VS can't open them:

  const int  Sz_Char = sizeof ( wchar_t );
  const wchar_t  Magic_UTF_16 = 0xFeFF ; ... 
  FILE  * fp = fopen ( "Howdy.TXT", L"wb" ); ...
  fwrite( & Magic_UTF_16, Sz_Char, 1, fp ); ...

You showed:

  String inp = new String(baos.toByteArray(), "UTF-16");
  System.out.write(inp.getBytes("UTF-8"));

Yea, UTF-16 to UTF-8, that should cause no damage to X.CPP,
X.CPP itself doesn't actually have to be UTF-16 encoded right now.

I wrote:
 
  Yes, I'm big on aesthetics like that.
  Macros reduce the size of the source code 
  and avoid having to look at ugly repetition, for example.
 
And you replied:  Repetition is definitely not your problem, in X.CPP... :-)

Of course, it was generated randomly... for all you know.


Technical Details
Message-ID: <Jeff_Relf_2006_Feb_17_yZFu@Cotse.NET>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-sci.physics.(1199963).mbox.7z!not-for-mail
References: <Jeff_Relf_2006_Feb_16_nvkC@Cotse.NET> <r05fc3-5di.ln1@sirius.tg00suus7038.net> <Jeff_Relf_2006_Feb_16_e5gd@Cotse.NET> <0efhc3-n7f.ln1@sirius.tg00suus7038.net> <Jeff_Relf_2006_Feb_17_cM10@Cotse.NET> <084ic3-ur4.ln1@sirius.tg00suus7038.net>

Show Full Headers
Complete Article Headers
Message-ID: <Jeff_Relf_2006_Feb_17_yZFu@Cotse.NET>
Subject: Java has no macros ! ? I couldn't use it.
Date: Sat, 18 Feb 2006 02:02:19 +0000
From: Jeff_โ„želf <Me@Privacy.NET>
References: <Jeff_Relf_2006_Feb_16_nvkC@Cotse.NET> <r05fc3-5di.ln1@sirius.tg00suus7038.net> <Jeff_Relf_2006_Feb_16_e5gd@Cotse.NET> <0efhc3-n7f.ln1@sirius.tg00suus7038.net> <Jeff_Relf_2006_Feb_17_cM10@Cotse.NET> <084ic3-ur4.ln1@sirius.tg00suus7038.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-sci.physics.(1199963).mbox.7z!not-for-mail
Newsgroups: news.software.readers,sci.physics,comp.os.linux.advocacy
Lines: 48
Content-Type: text/plain; charset=UTF-8
X-Trace: individual.net uqOMWjcDIskY8GXeusufWwy4Y4C05aqKf/yDAacfBC8K3Srwsw