[sv-bc] Result type of string indexing?
Subject: [sv-bc] Result type of string indexing?
From: Rishiyur S. Nikhil (nikhil@bluespec.com)
Date: Tue Feb 10 2004 - 09:11:40 PST
- Next message: Rishiyur S. Nikhil: "[sv-bc] Specs for atoi(), atohex(), ...,atoreal(), itoa(), ...?"
- Previous message: David W. Smith: "[sv-bc] Annex H of Draft 4"
- In reply to: Mark Hartoog: "[sv-bc] LRM review ch 18."
- Reply: Rishiyur S. Nikhil: "[sv-bc] Specs for atoi(), atohex(), ...,atoreal(), itoa(), ...?"
- Reply: Arturo Salz: "Re: [sv-bc] Result type of string indexing?"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
In Section 3.7, para 4, it says:
"Variables of type string can be indexed from 0 to N-1 ..."
Is the intended result type "int"?
Sec 3.7.3 says that str.getc() has type int, and that
"x = str.getc(j) is identical to x = str[j]"
but that is not the same thing as saying
"str.getc(j) is identical to str[j]"
since the assignment may be doing a coercion, i.e.,
str[j] could return a string, a byte, an int, ...
Should string indexing be added as a row in Table 3-2?
Nikhil
- Next message: Rishiyur S. Nikhil: "[sv-bc] Specs for atoi(), atohex(), ...,atoreal(), itoa(), ...?"
- Previous message: David W. Smith: "[sv-bc] Annex H of Draft 4"
- In reply to: Mark Hartoog: "[sv-bc] LRM review ch 18."
- Reply: Rishiyur S. Nikhil: "[sv-bc] Specs for atoi(), atohex(), ...,atoreal(), itoa(), ...?"
- Reply: Arturo Salz: "Re: [sv-bc] Result type of string indexing?"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
This archive was generated by hypermail 2b28
: Tue Feb 10 2004 - 09:18:57 PST