Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] <

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Quoting characters
From: "Alain Tougas" <alain@xxxxxxx>
Date: Mon, 16 Jul 2007 16:44:09 -0400

Hi,

Here's a set of procedures that could be pointing in the right direction:

to test :list
if empty? :list[stop]
oneword first :list
test bf :list
end

to oneword :word
ifelse (first :word) = ""
   [insert bf :word]
   [insert :word]
insert char 32
end

Or, use the ascii value of "quotation mark" for testing:
if (ascii first :wrd) = 34 [dothis]

To find out the ascii of a quotation mark:
show ascii ""
or
show ascii readchar
then type a quotation mark.

Hope this helps,

Alain

-----Original Message-----
From: mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
[mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Garry Clark
Sent: July 15, 2007 11:12 PM
To: MWForum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Quoting characters

I have used a procedure called
to write :dict
...

end
and an input to a procedure that is something like ["The adjective noun
verb]
hoping for a result like
The black cat ran

Now I want to check if an item starts with " and I want to print the other
characters.
I have used
make "wd first :dict and
if (first :wd) = "" [pr butfirst :wd]
but it doesn't work.
Is there a way to quote characters such as " ? I have used
if (first :wd) = "\" [pr butfirst :wd]
but that doesn't work either.
I can't find anything in the Help to help with this problem. Any ideas?
-----
Mr Garry Clark
Lecturer, School of Education
Milton Building
University of New England
Armidale 2351
Australia
Mobile 0408621135


Ph (61) 2 6773 5088
Fax (61) 2 6773 5078
Email gclark@xxxxxxxxxx <mailto:gclark@xxxxxxxxxx>
Homepage http://www.une.edu.au/ehps/staff/gclark.php
Information on Mathematical Activities CDs:
http://www.northnet.com.au/~mathsactivities/mathact.htm





  • Previous by thread: Re: Quoting characters

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008