What’s that funny character?


Run this code:


 


 


CREATE CURSOR foo (line c(100))


LIST STRUCTURE TO t.txt


APPEND FROM t.txt sdf


GO RECNO()-1


FOR i = 1 TO LEN(TRIM(line))


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


ENDFOR


 


 


 


 


 


It produces t.txt which looks like this:


 


 


Structure for table:    E:\FOXTEMP\00003HU100WC.TMP


Number of data records: 0      


Date of last update:      /  / 


Code Page:              1252   


Field  Field Name      Type                Width    Dec   Index   Collate Nulls    Next    Step


    1 LINE            Character             100                             No


** Total **                                  101


 


 


 


 


What is the character at position 6 of the field line?


 

Comments (10)

  1. Tom Green says:

    Duh.  I just have a blank in the 6th position.  I must be doing something wrong.

    — Tom

  2. Calvin_Hsia says:

    Whoops. What happens if you SET CARRY ON first?

    I left that line out of the sample.

  3. Timo says:

    Hi,

    Before the SET CARRY ON, I only saw spaces too. Afterwards, I got a CHR(25) at position 10.

    Location of that wierd character is depending on _screen.FontName and .FontSize too. Nice issue 🙂

  4. Calvin_Hsia says:

    Thanks Timo!

    So the question now is, what is a CHR(26) and why is it there? What does it have to do with SET CARRY ?

  5. In my last post, What’s that funny character?, I asked about a particular character. In fact, another…

  6. Alex Sosa says:

    CHAR(25), which is Ctrl-y.

    Ctrl-y is how you APPEND a new record.

    SET CARRY ON | OFF

    Brings data from all fields in all work areas forward from the current record to a new record.

    Why is it there?

  7. Alex Sosa says:

    OK, In Fox 2.6 that is the down arrow, which ties with the screen you showed.  It indicates which fields have SET CARRY ON, all in your example.  You can say SET CARRY TO line, for example.

  8. Alex, you don’t just need Fox 2.6, you can see it if you use FoxFont.

    Another interesting FoxFont behavior shows up when you’re drawing with @…TO.

    loForm = CREATEOBJECT("Form")

    loForm.Show()

    loForm.FontName = "Courier New"

    @ 1,1 TO 5,5

    @ 1,1 SAY "A"

    @ 5,5 SAY "Z"

    loForm.FontName = "FoxFont"

    @ 1,6 TO 5,10

    @ 1,6 SAY "A"

    @ 5,10 SAY "Z"

    The different fonts have rather different notions of how to draw boxes…

Skip to main content