V4RB, how to write TAB, CR in REALbasic

Frank Bitterlich bitterlich at gsco.de
Thu Feb 12 17:03:15 CST 2004


Ruslan,

If you want to specify such characters as the default value for the function
declaration, that's the way I do it normally:

Function importtext(File as FolderItem, fieldDelimiter as string="\t",
LineDelimiter as string = "\r")
    FieldDelimiter = ReplaceAll(ReplaceAll(FieldDelimiter, "\r", chr(13)),
"\t", chr(9))
   ...


(Actually, I'm using a global function for the ReplaceAll, so that even more
characters can be used).

That way, the user can even specify ttheir own special characters easily
(such as "\r\n").

Cheers,
   Frank+++



On 12.02.2004 16:22 Uhr, Frank Schima wrote:

> 
> On Feb 12, 2004, at 10:05 AM, Ruslan Zasukhin wrote:
> 
>> on 2/12/04 4:45 PM, Frank Schima at frank-list2 at mindstarprods.com
>> wrote:
>> 
>>> Hi Ruslan,
>>> 
>>> 
>>> On Feb 12, 2004, at 8:53 AM, Ruslan Zasukhin wrote:
>>> 
>>>>         "ImportText(
>>>>             File as FolderItem,
>>>>             FieldDelimeter as String = "\t",
>>>>             LineDelimeter as String = "\r" )"
>>>> 
>>>> 
>>>> Is this syntax correct in RB ?
>>>> 
>>>> I need specify TAB symbol and CR.
>>> 
>>> No. You need to use chr() commands.
>>> 
>>> Tab = chr(9)
>>> CR = chr(13)
>> 
>> But can I use this in function declaration ?
>> As I have show?
>> 
>> 
>>              "ImportText(
>>                  File as FolderItem,
>>                  FieldDelimeter as String = chr(9)
>>                  LineDelimeter as String = chr(13) )
> 
> Yes, I tested it.
> 
> myVCursor.ImportText(myFolderItem, chr(9), chr(13))

-- 
   There's no place like 127.0.0.1

Günter Schmidt & Co. oHG
Frank Bitterlich             eMail: bitterlich at gsco.de
Schlosserstr. 4              WWW:   http://www.gsco.de/gsco
D-60322 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28




More information about the Valentina mailing list