[M3devel] NARROW(refanyValue, procedureType)
mika at async.caltech.edu
mika at async.caltech.edu
Sat Apr 6 22:51:45 CEST 2013
I think it works as long as you define a (fully specified) wrapper type.
e.g.,
TYPE
P = PROCEDURE (x, y : INTEGER) : INTEGER;
W = REF RECORD p : P END;
...
PROCEDURE Add(x, y : INTEGER) : INTEGER =
...
TextWTbl wtbl...
wtbl.put("add", NEW(W, p := Add));
...
=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:
>
>--Apple-Mail=_6C972875-A6B1-4175-AD68-BEF89BE30CCF
>Content-Type: multipart/alternative;
> boundary="Apple-Mail=_A84F0FAA-1961-4C86-AD4B-C98D5D8A4EC4"
>
>
>--Apple-Mail=_A84F0FAA-1961-4C86-AD4B-C98D5D8A4EC4
>Content-Transfer-Encoding: quoted-printable
>Content-Type: text/plain;
> charset=utf-8
>
>Is this possible in any way? Can I use any Sequence/Table type to hold =
>procedure typed values inside?
>
>new source -> compiling XLModule.m3
>"../src/XLModule.m3", line 181: NARROW: types must be assignable
>"../src/XLModule.m3", line 239: incompatible types (x)
>
>Second one is RefSeq.T.addhi(procedureType)
>
>TIA,
>dd
>--
>Dragi=C5=A1a Duri=C4=87
>dragisha at m3w.org
>
>
>
>
>--Apple-Mail=_A84F0FAA-1961-4C86-AD4B-C98D5D8A4EC4
>Content-Transfer-Encoding: quoted-printable
>Content-Type: text/html;
> charset=utf-8
>
><html><head></head><body style=3D"word-wrap: break-word; =
>-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Is =
>this possible in any way? Can I use any Sequence/Table type to hold =
>procedure typed values inside?<div><br></div><div><div>new source -> =
>compiling XLModule.m3</div><div>"../src/XLModule.m3", line 181: NARROW: =
>types must be assignable</div><div>"../src/XLModule.m3", line 239: =
>incompatible types (x)</div></div><div><br></div><div>Second one is =
>RefSeq.T.addhi(procedureType)</div><div><br></div><div>TIA,</div><div>dd</=
>div><div><div apple-content-edited=3D"true">
><span class=3D"Apple-style-span" style=3D"font-family: Helvetica; "><div =
>style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
>-webkit-line-break: after-white-space; "><span class=3D"Apple-style-span" =
>style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
>Helvetica; font-style: normal; font-variant: normal; font-weight: =
>normal; letter-spacing: normal; line-height: normal; orphans: 2; =
>text-align: -webkit-auto; text-indent: 0px; text-transform: none; =
>white-space: normal; widows: 2; word-spacing: 0px; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
>auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div =
>style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
>-webkit-line-break: after-white-space; =
>"><div>--</div></div></span></div></span><span class=3D"Apple-style-span" =
>style=3D"font-family: Helvetica; ">Dragi=C5=A1a Duri=C4=87</span><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; color: =
>rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: =
>normal; font-weight: normal; letter-spacing: normal; line-height: =
>normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; =
>text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
>auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div =
>style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
>-webkit-line-break: after-white-space; "><span class=3D"Apple-style-span" =
>style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
>Helvetica; font-style: normal; font-variant: normal; font-weight: =
>normal; letter-spacing: normal; line-height: normal; orphans: 2; =
>text-align: -webkit-auto; text-indent: 0px; text-transform: none; =
>white-space: normal; widows: 2; word-spacing: 0px; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
>auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div =
>style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
>-webkit-line-break: after-white-space; "><div><a =
>href=3D"mailto:dragisha at m3w.org">dragisha at m3w.org</a></div><div><br></div>=
></div></span></div></span><br class=3D"Apple-interchange-newline">
></div>
><br></div></body></html>=
>
>--Apple-Mail=_A84F0FAA-1961-4C86-AD4B-C98D5D8A4EC4--
>
>--Apple-Mail=_6C972875-A6B1-4175-AD68-BEF89BE30CCF
>Content-Transfer-Encoding: 7bit
>Content-Disposition: attachment;
> filename=signature.asc
>Content-Type: application/pgp-signature;
> name=signature.asc
>Content-Description: Message signed with OpenPGP using GPGMail
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
>
>iQEcBAEBAgAGBQJRYGwFAAoJEJtljYXUJo8xGvgH/0MAKizqVsumCaf25qcldgcH
>PPBGWW5VPRmTEDU2sgRD+1HdkiXwW9Bq5l6Ywv6uIdbZF5SYv64+EAwb9ZCBwIDo
>2SxOKZmr0Z4ECl5Jyn6MgZxIOq4sVdHhQ+F5k/1o7C0v7x582A0Td8QnvijoQdRs
>LQqQW9ZNYlLDf57dlpCm5+baXem8KO1PNo7Z4If2ceTEaqIb++Ax/Nc8wzEqN1uD
>br4GfPKzNmJgQ6RlHbqdoesM4HmbdF2nxMSkVdA8Ydgi5EQH4zBEKFfOsp1uzRjC
>VtUkeBwhQyLWNQaaJlR4rzbMDLJprdIyrs9WYQKMALGoYZQiDecy/oH6s8Awgi0=
>=tvjq
>-----END PGP SIGNATURE-----
>
>--Apple-Mail=_6C972875-A6B1-4175-AD68-BEF89BE30CCF--
More information about the M3devel
mailing list