Click Here
home features news forums classifieds faqs links search
6155 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
22 crawler(s) on-line.
 95 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  ARexx and ' problem....
Register To Post

PosterThread
Tuxedo 
ARexx and ' problem....
Posted on 20-May-2012 10:54:30
#1 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2356
From: Perugia, ITALY

Hi ALL!
Since on my LoView Suite I use ARexx port to communicate between programs I need some help on managin ARexx(I dunno nothing or quite nothing of ARExx...).

The problem was that:

I send command thorught ARexx port and use ' character to enclose the Rexx line...but if in the filename I have another ' the line was truncated and get an error...

How I can solve that issue? Can I parse file name and add some special character to have Rexx recognize te correct/entire line? Anything else to do?

Thank you!

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Belxjander 
Re: ARexx and ' problem....
Posted on 20-May-2012 11:12:13
#2 ]
Cult Member
Joined: 4-Jan-2005
Posts: 557
From: Chiba prefecture Japan

@Tuxedo

You may need to pre-process the string and insert an "escape" character or use " instead of ' or ` characters.

I recall using ' characters and " characters in string handling for writing rexx scripting on my own system some years ago

If that is any help?

 Status: Offline
Profile     Report this post  
broadblues 
Re: ARexx and ' problem....
Posted on 20-May-2012 11:37:31
#3 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4456
From: Portsmouth England

@Tuxedo

Can you expand a bit on your problem, perhaps with a specific example?

how are you sending the command?

Sometimes you simply can't get the right combinatin of quotes etc if you are testing from the command line with C:rx so have to write a test script

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: ARexx and ' problem....
Posted on 20-May-2012 13:29:31
#4 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2356
From: Perugia, ITALY

@all

the syntax was that:


SendRexxCommand("LOVIEW_THUMB_VIEWER", "'THUMB " .. file$[StartFile] .. "'")


LOVIEW_THUMB_VIEWER was the ARexx port of the program where I send the command

THUMB was the ARexx command I send

and the other was the file where I start read from...

I use the "(double quote) and the '(apices) to concatenate a full line to pass to the other program...

AFAIK ARexx needs ' to concatenate a full line like " to concatenate a full line on CLI...

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
broadblues 
Re: ARexx and ' problem....
Posted on 20-May-2012 14:51:17
#5 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4456
From: Portsmouth England

@Tuxedo

I don't recognise the SendArexxCommand function is that a Hollywood command?

Have you simply tried it without any single quotes?

A lot depends on how that command sends the command onto ARexx but normally Arexx commands are sent as a single string so there would be no need to add the inner single quotes.


_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
thomas 
Re: ARexx and ' problem....
Posted on 20-May-2012 14:53:27
#6 ]
Super Member
Joined: 28-May-2003
Posts: 1155
From: Germany

@Tuxedo

In ARexx you can use ' or " to delimit strings as you like.

To create a string which contains a single apostrophe, you can write either "'" or ''''.

To create a sting which contains a single double-quote character you can write either '"' or """".

_________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: ARexx and ' problem....
Posted on 21-May-2012 19:05:41
#7 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2356
From: Perugia, ITALY

@thomas

that's exactly what I looknig for THANK YOU! :)

Only one thing...dont was '''' but '' to parse the apostrophe, if I use 4 that I get 2 ' in the parsed text, but with 2 ' was ok :)

Thank you all for replying! :D

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
thomas 
Re: ARexx and ' problem....
Posted on 22-May-2012 7:29:55
#8 ]
Super Member
Joined: 28-May-2003
Posts: 1155
From: Germany

@Tuxedo

What I wrote is correct. I'll try to explain it in other words:

If the string is delimited by apostrophes you can use quotation marks in the text but if you want to use apostrophes, you need to duplicate them.

text1 = 'Mike said "This is Tom''s house".'


If the string is delimited by quotation marks, you can use apostrophes in the text but if you want to use quotation marks, you need to duplicate them.

text2 = "Mike said ""This is Tom's house""."


_________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: ARexx and ' problem....
Posted on 23-May-2012 12:16:41
#9 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2356
From: Perugia, ITALY

@thomas

ok, I've intended it wrong :)

However now all works fine :)

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle