Deutsch English Français Italiano |
<ue2ji1$3dqiq$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!newsreader4.netcologne.de!news.netcologne.de!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thomas <fantome.forums.tDeContes@free.fr.invalid> Newsgroups: fr.comp.lang.ada Subject: =?UTF-8?B?UmU6IFF1ZXN0aW9uIGRlIGfDqW7DqXJpY2l0w6k=?= Date: Fri, 15 Sep 2023 23:49:53 +0200 Organization: A noiseless patient Spider Lines: 33 Message-ID: <ue2ji1$3dqiq$1@dont-email.me> References: <uclnsh$fii$1@shakotay.alphanet.ch> <c3d74ebf-7153-4eb2-a22d-72b7c77ecf0bn@googlegroups.com> <uco7u8$156$1@shakotay.alphanet.ch> <26366041-5cd3-4ccf-b1ac-a937a1c53f3en@googlegroups.com> <ucql7j$vn3$1@shakotay.alphanet.ch> <a98095df-01d5-45ef-8bd3-ac2968e0a344n@googlegroups.com> <ucstqi$vg1$1@shakotay.alphanet.ch> <ucunje$b6dt$1@dont-email.me> <ucv28v$dhd$1@shakotay.alphanet.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 15 Sep 2023 21:49:53 -0000 (UTC) Injection-Info: dont-email.me; posting-host="b945c602ee3f0bbb935104ad5d1b4d62"; logging-data="3598938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RkF2mGoa28fbSDnT0KQ2blmWsW5nAx/U=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Cancel-Lock: sha1:4F8eTBzA4YOteLi0fjPkDvS98Rg= Content-Language: fr-FR In-Reply-To: <ucv28v$dhd$1@shakotay.alphanet.ch> Bytes: 2861 Le 02/09/2023 à 12:20, DrPi a écrit : > Le 02/09/2023 à 09:18, J-P. Rosen a écrit : >> Le 01/09/2023 à 16:52, DrPi a écrit : >>> Ce qui me pose problème, c'est que j'aimerais que la fonction >>> "To_TW_STR" renvoie un type entièrement contraint. >>> EN reprenant les définitions de départ / >>> subtype t_TW_STR32 is char_array (1 .. 34); >>> subtype t_TW_STR64 is char_array (1 .. 66); >>> subtype t_TW_STR128 is char_array (1 .. 130); >>> subtype t_TW_STR255 is char_array (1 .. 256); >>> >>> J'aimerais pouvoir instancier une fonction qui retourne "t_TW_STR32", >>> une qui retourne "t_TW_STR64"... >> >> En Ada, l'homonymie et la résolution des surcharges est basée sur les >> types, jamais sur les sous-types. Pourquoi? Parce que le type est >> connu à la compilation, mais qu'un sous-type peut être dynamique. >> > OK. > Donc, si je changeais "t_TW_STR32" et autres en "type" et non en > "subtype", il serait possible de faire ce que je veux ? je serais curieux d'avoir la fin de ton retour d’expérience par rapport à ce pb, cad : - savoir si ça a résolu ton pb, - et surtout savoir si ça n'en a pas généré d'autres à des endroits où tu avais besoin que ces sous-types soient compatibles entre eux :-) -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/