Re: typed constants
P Padil via fpc-pascal <[email protected]> Fri, 2 Jan 2026 11:16:51 -0800
| Newsgroups | gmane.comp.compilers.free-pascal.general |
|---|---|
| Message-ID | <[email protected]> |
Ok I should have read the error message, the problem is with the following declaration, not the first: const tprob: double = 0.020000000; lprob: double = tprob/1e4; If I remove the types then it compiles, with the types it says "Error: Illegal expression” on the second declaration. > On Jan 2, 2026, at 10:57 AM, P Padil <[email protected]> wrote: > > I attempted to use a typed constant: > > const > tprob : Double = 0.020; > > But the compiler (3.2.2) balked as illegal expression. Am i misreading section "2.2 Typed constants” in the reference manual? > > Thanks, > Pete _______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal