Tcl 8.4 more DOSsy than 8.3 ? 
Author Message
 Tcl 8.4 more DOSsy than 8.3 ?

Hi all,

executing the following script on a linux box using either tcl8.3.3
or tcl8.4.0 gives different results:

----------------
#!/usr/bin/tclsh8.4
#!/usr/local/bin/tclsh8.3

puts "this is tcl $tcl_patchLevel"
set a "aaa^Zbbb"
puts "done"
----------------

With tcl8.3 it does what it should, but with tcl8.4 it stops with
this error:

this is tcl 8.4.0
missing "
    while executing
"set a"
    (file "./x" line 5)

Does this ancient, long forgotten ^Z mummy celebrate its revival?

Best regards

Ulrich

--
SIGOS Systemintegration GmbH
 - TESTING IS OUR COMPETENCE -
Fon +49 911 95168-0
www.sigos.de

Visit us at the 3GSM World Congress 2003 in Cannes, France
February 17 - 21 , in hall 2 stand G5



Sun, 31 Jul 2005 20:19:55 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:

> Hi all,

> executing the following script on a linux box using either tcl8.3.3
> or tcl8.4.0 gives different results:

> ----------------
> #!/usr/bin/tclsh8.4
> #!/usr/local/bin/tclsh8.3

> puts "this is tcl $tcl_patchLevel"
> set a "aaa^Zbbb"
> puts "done"
> ----------------

> With tcl8.3 it does what it should, but with tcl8.4 it stops with
> this error:

> this is tcl 8.4.0
> missing "
>     while executing
> "set a"
>     (file "./x" line 5)

> Does this ancient, long forgotten ^Z mummy celebrate its revival?

> Best regards

> Ulrich

Hm, perhaps this is due to the support of VFS and Tclkit within
Tcl proper? Tclkit uses ^Z as a separator between the header and the
data part!

Regards,

Arjen



Sun, 31 Jul 2005 20:37:11 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?


: but with tcl8.4 it stops with
:this error:

:missing "
:    while executing
:"set a"
:    (file "./x" line 5)

Please be certain to file this bug at http://tcl.sf.net/

I'm hoping that this can be fixed.

--
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Sun, 31 Jul 2005 22:24:25 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:


> : but with tcl8.4 it stops with
> :this error:

> :missing "
> :    while executing
> :"set a"
> :    (file "./x" line 5)

> Please be certain to file this bug at http://tcl.sf.net/

> I'm hoping that this can be fixed.

Humm... probably not a bug (from the Changes file):
2000-09-06 (cross-platform feature) Set ^Z (\32) as default EOF char. (hobbs)

--
Pascal



Sun, 31 Jul 2005 23:04:26 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:
>: but with tcl8.4 it stops with
>:this error:

>:missing "
>:    while executing
>:"set a"
>:    (file "./x" line 5)

> Please be certain to file this bug at http://tcl.sf.net/

> I'm hoping that this can be fixed.

Fixed?!  This was an intentional change to support starkits (formerly
"scripted documents").

See the docs for Tcl_EvalFile() for notes on this.  Also, check the
ChangeLogs and release notes.  Or see the Wiki:

http://wiki.tcl.tk/3099

--
| Don Porter          Mathematical and Computational Sciences Division |

| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



Sun, 31 Jul 2005 23:06:53 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:


> : but with tcl8.4 it stops with
> :this error:

> :missing "
> :    while executing
> :"set a"
> :    (file "./x" line 5)

> Please be certain to file this bug at http://tcl.sf.net/

> I'm hoping that this can be fixed.

> --
> Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
> Even if explicitly stated to the contrary, nothing in this posting
> should be construed as representing my employer's opinions.


Hi Larry,

considering your and Arjens answers, I'm not quite sure if it's really
a bug or just a misfeature (or even an enhancement).

It is certainly bad style to have verbose control characters in scripts.
OTH, an upgrade from 8.3 to 8.4 shouldn't break scripts for such things
as control chars in the text.

Should I really file this behaviour change as a bug, or simply fix
the few locations in the tcl scripts from ^Z to \x1a ?

Best regards

Ulrich

--
SIGOS Systemintegration GmbH
 - TESTING IS OUR COMPETENCE -
Fon +49 911 95168-0
www.sigos.de

Visit us at the 3GSM World Congress 2003 in Cannes, France
February 17 - 21 , in hall 2 stand G5



Sun, 31 Jul 2005 23:11:49 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:

> Hi Larry,

> considering your and Arjens answers, I'm not quite sure if it's really
> a bug or just a misfeature (or even an enhancement).

> It is certainly bad style to have verbose control characters in scripts.
> OTH, an upgrade from 8.3 to 8.4 shouldn't break scripts for such things
> as control chars in the text.

> Should I really file this behaviour change as a bug, or simply fix
> the few locations in the tcl scripts from ^Z to \x1a ?

> Best regards

> Ulrich

Hi all,

I just received Pascals and Dons postings.

I'll fix our scripts and take it as an enhancement (I really like
starkits).

Best regards

Ulrich

--
SIGOS Systemintegration GmbH
 - TESTING IS OUR COMPETENCE -
Fon +49 911 95168-0
www.sigos.de

Visit us at the 3GSM World Congress 2003 in Cannes, France
February 17 - 21 , in hall 2 stand G5



Sun, 31 Jul 2005 23:16:27 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?


:  Or see the Wiki:
:
:http://wiki.tcl.tk/3099

I'm looking there, but don't see to what you are referring...
where's the entry under Tcl: changed behavior to say "user scripts
containing a literal byte 0x1a (ie ^Z) now will generate syntax errors?

--
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Sun, 31 Jul 2005 23:36:57 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?



:>: but with tcl8.4 it stops with
:>:this error:
:> I'm hoping that this can be fixed.
:
:Fixed?!  This was an intentional change to support starkits (formerly
:"scripted documents").

Sorry - but in my opinion, if data within a program string causes Tcl
parsing problems, then that is a bug.  Tcl claims to handle binary data -
that byte is just one of 256 binary values that need to be handled.
--
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Sun, 31 Jul 2005 23:33:45 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:


>: but with tcl8.4 it stops with
>:this error:

>:missing "
>:    while executing
>:"set a"
>:    (file "./x" line 5)

>Please be certain to file this bug at http://tcl.sf.net/

>I'm hoping that this can be fixed.

Hm, FWIW, I cannot reproduce this under Tcl 8.4.1 on Win98. Maybe it's
fixed (well, changed, if it was not a bug) already.
Helmut Giese


Mon, 01 Aug 2005 00:04:15 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:



> :>: but with tcl8.4 it stops with
> :>:this error:

> :> I'm hoping that this can be fixed.
> :
> :Fixed?!  This was an intentional change to support starkits (formerly
> :"scripted documents").

> Sorry - but in my opinion, if data within a program string causes Tcl
> parsing problems, then that is a bug.  Tcl claims to handle binary data -
> that byte is just one of 256 binary values that need to be handled.

It is a fact that the ^Z behavior was already a core facet on Windows,
determined by the OS.  We just decided to leverage that across the
platforms.  Ulrich's script would never have worked on Windows.

--
     Jeff Hobbs                     The Tcl Guy
     Senior Developer               http://www.ActiveState.com/
         Tcl Support and Productivity Solutions



Mon, 01 Aug 2005 00:53:33 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:

>:  Or see the Wiki:
>:
>:http://wiki.tcl.tk/3099

> I'm looking there, but don't see to what you are referring...
> where's the entry under Tcl: changed behavior to say "user scripts
> containing a literal byte 0x1a (ie ^Z) now will generate syntax errors?

Search for the word "source".

--
| Don Porter          Mathematical and Computational Sciences Division |

| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



Mon, 01 Aug 2005 00:57:18 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:

> Sorry - but in my opinion, if data within a program string causes Tcl
> parsing problems, then that is a bug.  

There is no parsing problem.  The new behavior defines a cross-platform
EOF character when reading data from a file.  The parser never sees
the bytes that were past the EOF.  They don't get read in.

--
| Don Porter          Mathematical and Computational Sciences Division |

| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



Mon, 01 Aug 2005 00:59:41 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?
Hi Larry,

Quote:

> Sorry - but in my opinion, if data within a program string causes
> Tcl parsing problems, then that is a bug.  Tcl claims to handle
> binary data - that byte is just one of 256 binary values that need
> to be handled.

In source code?  IMO no source code in any language should ever
contain control characters in data definitions, except line breaks
where allowed by the language.  (Thinking of APL) Ok, make that most
languages ;-), but certainly not Tcl.

so long, benny



Mon, 01 Aug 2005 00:56:21 GMT  
 Tcl 8.4 more DOSsy than 8.3 ?

Quote:

> Sorry - but in my opinion, if data within a program string causes Tcl
> parsing problems, then that is a bug.  Tcl claims to handle binary data -
> that byte is just one of 256 binary values that need to be handled.

Doh !!!

We use ctrl characters often...ctrl-W and ctrl-V are our preference.

Mostly for middlemen services, where we cant predict the data coming
into us.  So we give the callers the entire printable ASCII range and
we use ctrl chars underneath.



Mon, 01 Aug 2005 03:45:31 GMT  
 
 [ 22 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Stubs with Tcl 8.3 vs Tcl 8.4

2. CONST Tcl 8.3 vs Tcl 8.4

3. problem about tcl 8.3 and 8.4

4. Q: speed open call Tcl 8.3 vs 8.4

5. trace incompatibility in 8.4 and 8.3 ?

6. glob difference between 8.3 and 8.4

7. Tk 8.3 -> 8.4, surprisingly slow text widget

8. cross-version voodoo: handling 8.3 / 8.4 private structure changes

9. 8.4 vs 8.3

10. TCL is not thread safer in TCL 8.3 or 8.4... Any plans to fix this?

11. "clock" command: millisecond-resolution timers in Tcl 8.3/8.4

12. Looking for the Tcl Plugin that is based on Tcl 8.3

 

 
Powered by phpBB® Forum Software