delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/08/14/16:07:46

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Tue, 14 Aug 2012 22:06:59 +0200
From: Kai-Martin Knaak <kmk AT familieknaak DOT de>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] silk layer names
Message-ID: <20120814220659.340fdd34@akka>
In-Reply-To: <20120814174853.4373.qmail@stuge.se>
References: <20120813012700 DOT 2106039c AT akka>
<k0d64k$ett$1 AT dough DOT gmane DOT org>
<20120814174853 DOT 4373 DOT qmail AT stuge DOT se>
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
X-Provags-ID: V02:K0:CLfGSd4PtCeymySwlhcNSX1KzQ4O9/QHPAopFiVbxjD
pqgaBtOOnh45hwV9eSaSs7U9peZRfSmt4y5lOk6ryh9xdJap+U
PCDUTwgWGpnnhYJwakotli4oThfHjyNcNHy3hoByCw4Gb2PdEU
DfKUsKPEiIS4pR3I5cnP4cc1apHpfUoSEfFa5sc1SJmBAGWOGq
a4QTt/IMvwQxd+ZzxfTgrkfktWx4FDncRK/hEOqX1c1h5uvEBe
6rU9+8nlkgM9rIJuwm/8yANxS2Gtp3DRrWwOibdECeP5tIzqgT
2ssq6DM4hm0Q/g2B87M3ALegwVL3cNwhsB0yQcdr09bAC49iA=
=
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--Sig_/pDeAK=bsRgOxpZi04zbmg_w
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Peter Stuge <peter AT stuge DOT se> schrieb am 14. August 2012:

> > +      if (Settings.ShowSolderSide)
> > +         *text =3D (char *)UNKNOWN
> > (PCB->Data->Layer[solder_silk_layer].Name);
> > +      else
> > +         *text =3D (char *)UNKNOWN
> > (PCB->Data->Layer[component_silk_layer].Name); =20
>=20
> How about:
>=20
>   *text =3D (char *)UNKNOWN (PCB->Data->Layer[Settings.ShowSolderSide ?
> solder_silk_layer : component_silk_layer].Name);

Well, I am not familiar with conditional assignments. Looks a bit
cryptic to me. I certainly would not have come up with such a line.=20
But in the end, I don`care, as long as the code does, what I want.

=20
> The if looks not great.

This seems like a matter of personal preference. I like the pascal=20
approach, which almost reads like natural language :^)


=20
> And those identifiers are way too long in my taste. :)

They were already in the code. I just used what was defined somewhere
else. However, I appreciate such verbatim names. They make the source=20
so much easier to comprehend -- especially, for a low time coder like me.

---<)kaimartin(>---
--=20
Kai-Martin Knaak

--Sig_/pDeAK=bsRgOxpZi04zbmg_w
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlAqr+MACgkQt9RkiGwLn1N9qgCeMlQX9qhv2vfh0D6z0dJ25owx
kvEAoIT76Ni/BkjnYIOSgT4t7WDxvUPV
=C88X
-----END PGP SIGNATURE-----

--Sig_/pDeAK=bsRgOxpZi04zbmg_w--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019