次の方法で共有


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!?!

Comments

  • Anonymous
    July 28, 2006
    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
  • Anonymous
    July 28, 2006
    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>
  • Anonymous
    July 29, 2006
    To see this in VFP you need to use the FONT FoxFont for the _screen object.
  • Anonymous
    August 03, 2006
    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.