Welcome to MSDN Blogs Sign in | Join | Help

What was that strange character? The mystery deepens

In my last post, What's that funny character?, I asked about a particular character. In fact, another mystery character can occur.

Embarassingly, SET CARRY ON was set on my machine when I ran the code, and I didn’t add it to the sample. It’s off normally (choose Tools->Options->General->Fill new records with current values)

Apparently I had it set ON in the registry (Tools->Options->Set as Default), which writes that value to HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0\Options, probably because I was debugging some other issue.

 

Try this code:

 

SET CARRY ON

CREATE CURSOR foo (line c(100), date c(10))

SET FIELDS TO line

LIST STRUCTURE TO t.txt

APPEND FROM t.txt sdf

GO RECCOUNT()-2

SCAN NEXT 2

      ?"Rec #",RECNO()

      FOR i = 1 TO 15

            ?i,SUBSTR(line,i,1),ASC(SUBSTR(line,i,1))

      ENDFOR

ENDSCAN

 

 

 

Now there’s another extra character. What’s going on?

 

Take a look at this picture and you’ll see the answer.

 

How far back does this behavior go? At least a dozen years!?!

 

Published Thursday, July 27, 2006 10:50 AM by Calvin_Hsia
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Now we have two funny characters?

Friday, July 28, 2006 8:08 AM by Ilian
SET CARRY ON

CREATE CURSOR foo (line c(100), date c(10), line2 c(10))

SET FIELDS TO line, line2
LIST STRUCTURE TO t.txt
APPEND FROM t.txt sdf

GO RECCOUNT()-3

SCAN NEXT 3

     ?"Rec #",RECNO()

     FOR i = 20 TO 30

           ?i,SUBSTR(line,i,1),ASC(SUBSTR(line,i,1))

     ENDFOR

ENDSCAN

# re: What was that strange character? The mystery deepens

Friday, July 28, 2006 2:46 PM by John Koziol
One of us (I forget who) filed a bug or two on this years ago but it was a "Won't Fix" and was probably forgotten.

Fix it!  <g>

# re: What was that strange character? The mystery deepens

Sunday, July 30, 2006 6:33 AM by Fernando D. Bozzo
To see this in VFP you need to use the FONT FoxFont for the _screen object.

# re: What was that strange character? The mystery deepens

Friday, August 04, 2006 4:16 AM by Alex Sosa
Looks like it was the way FP DOS told the user that issued LIST STRUCUTRE that field was SET FIELDed TO, just like the down arrow was the way it used to announce which fields have been SET CARRYed ON.

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker