Deutsch English Français Italiano |
<slrnvb9kae.28a.dan@djph.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Dan Purgert <dan@djph.net> Newsgroups: comp.lang.c Subject: Re: how cast works? Date: Thu, 8 Aug 2024 14:08:14 -0000 (UTC) Organization: A noiseless patient Spider Lines: 17 Message-ID: <slrnvb9kae.28a.dan@djph.net> References: <v8vlo9$2oc1v$1@dont-email.me> <slrnvb7kis.28a.dan@djph.net> <casting-20240808134403@ram.dialup.fu-berlin.de> Injection-Date: Thu, 08 Aug 2024 16:08:14 +0200 (CEST) Injection-Info: dont-email.me; posting-host="be904645b0ac92b7abcd8ca08bfc1d1d"; logging-data="24470"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qhr/i8LkPlCiqA59jZI4fur2MG1dpIk0=" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:aWDYh1lVcGKrvVLpRIC32yy8HSM= Bytes: 1573 On 2024-08-08, Stefan Ram wrote: > Dan Purgert <dan@djph.net> wrote or quoted: >>I don't know what happens when you're changing datatype lengths, but if >>they're the same length, it's just telling the compiler what the >>variable should be treated as (e.g. [8-bit] int to char) > > Casting doesn't tweak a value right where it sits, so you don't > have to stress about resizing memory. (It hands you an rvalue, > not an lvalue.) Yeah, I have to admit I've been driving myself mad trying to learn AVR-Assembly lately, so ... types don't exist :| -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860