Re: TIP #188: Add 'string is wide' to the 'string is' Subcommand

From: Mike Tuxford (tuxfordNOSPAM_at_NORETURNearthlink.net)
Date: 04/27/04


Date: Tue, 27 Apr 2004 02:11:29 GMT

Bruce Hartweg <bruce-news@hartweg.us> wrote:
:
:
:Mike Tuxford wrote:
:
:> Darren New <dnew@san.rr.com> wrote:
:> :Kevin Kenny wrote:
:> :> The *string* command supports tests for a number of Tcl's basic types,
:> :> for example, integers, doubles, and booleans. This TIP proposes adding
:> :> wide integers.
:> :
:> :Perhaps [string is wideint] might be a better name. For example, when I
:> :first looked at the title, I thought it would be testing for wide
:> :characters, i.e., outside the ASCII 7-bit range.
:> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:> Myself, I'd like one of those. Currently I am doing like this:
:>
:> scan $char %c num
:> if {$num>31 && $num<127} {
:>
:> or am I just missing something?
:>
:maybe
:
:string is ascii
:string is print
:string is control

  Yeah, but doesn't fit my needs. If it fails the [if] then control
flows to:

    } else {
      switch -- $num {
        2 { # ^B routine }
        3 { # ^C routine }
      ...

-- 
  _ _    ____
 //\/\ike ||uxford
 tuxford@earthlink.net


Relevant Pages

  • Re: TIP #188: Add string is wide to the string is Subcommand
    ... > for example, integers, doubles, and booleans. ... Perhaps [string is wideint] might be a better name. ...
    (comp.lang.tcl)
  • Re: conversion of types.
    ... I am reading the whole row as a string using fgets. ... I might write doubles to a binary file where each double is eight bytes long. ... You need to delimit the values with an 'out-of-bound' character like '|' or something. ... You have to know the format of the file you are reading. ...
    (comp.lang.c)
  • Double.ToString round-trip: "R" vs. "G17"
    ... and therefore the doubles have to be represented as strings. ... We also need to be able to take the XML back from the browser and parse the ... decimal string representation, but at this point it would be a major ... as the original double, it's done, otherwise output it with 17 decimals. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: socket communication: send & receive doesnt work right
    ... So I don't want to send a string as bytes. ... I did a test of sending two doubles: ... public void send_doubles(double vals, int len) throws ... char *result; ...
    (microsoft.public.win32.programmer.networks)
  • Re: [PHP] Re: optimilize web page loading
    ... doubles for the email. ... Philip Thompson wrote: ... the PHP parser doesn't have to evaluate ... this string to determine if anything needs to be translated (e.g., ...
    (php.general)