X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Jun 2006 10:40 AM by  anon
how to make \r\n in read
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
10 Jun 2006 10:40 AM
    hello i write program with following statement READ, PROMPT="Enter value ", A how insert \r\n in PROMPT keyword ? i was looking at help only what i can find - it's that PRINT use \r\n yet (it's built-in)

    Deleted User



    New Member


    Posts:
    New Member


    --
    10 Jun 2006 10:40 AM
    This is IDL's way to put those carriage return and newline characters in a string: IDL> mystring = "Enter" + string(13b) + string(10b) + "value" ; 13B and 10B are ASCII char ID's for carriage return and newline. IDL> print, mystring Enter value I was surprised to see that this CAN work effectively in an IDL prompt, if the carriage return/newline is put at the end of the prompt. Thus: IDL> READ, PROMPT="Enter value" + string(13b) + string(10b), A on IDL for Windows at least will produce the following in the IDL output log, if the user's entry is '10': Enter value 10 James Jones
    You are not authorized to post a reply.