logo-lang


How to catch command line arguments in Berkley Logo (UCBLogo)?


Berkeley Logo User Manual tells that all command line arguments after a hypen will be collected in the variable:
If a command line argument is just a hyphen, then all command line arguments
after the hyphen are not taken as filenames, but are instead collected in a
list, one word per argument; the buried variable COMMAND.LINE contains that
list of arguments, or the empty list if there are none. On my Linux system,
if the first line of an executable shell script is
#!/usr/local/bin/logo -
(note the hyphen) then the script can be given command line arguments and
they all end up in :COMMAND.LINE along with the script's path. Experiment.
I try it, and it doesn't work:
$ cat test.lg
#!/usr/bin/logo -
print :COMMAND.LINE
$ ./test.lg
I can't open file -
?
Is there any ideas what's wrong?
I use ucblogo 5.5-2.1 from Ubuntu packages.
Berkeley Logo 5.5 does not support parsing of command line arguments from a script.
The User Manual you quoted is for Berkeley Logo version 6. You should be able to use command line arguments just like that using ucblogo-6.0.
You can download Berkeley Logo 6.0 from http://www.eecs.berkeley.edu/~bh/

Related Links

Working with lists in LOGO
Logo if statement
Return length of label, in pixels
How to catch command line arguments in Berkley Logo (UCBLogo)?
What are the drawbacks/weaknesses of using LOGO?
Which LOGO implementation? [closed]
How do I move the turtle in LOGO? [closed]
What is the current status of LOGO? (The programming language) [closed]

Categories

HOME
internet-explorer
oop
indexing
cors
process
ldap
wifi
grpc
conceptual
mifare
pandoc
symfony-sonata
glympse
yuv
annyang
box-api
olap
decoding
dompdf
template10
css-float
passbook
keystone
aws-iot
functional-dependencies
struts
mongoose-im
visual-studio-community
jboss-arquillian
selenium3
schedule
jql
javax
gitosis
minitest
mkdir
respect-validation
matrix-multiplication
keychain
mixed-models
wicket-tester
irr
web-technologies
pexpect
grails-2.0
taleo
amazon-fire-tv
encoder
hierarchical-clustering
stanford-nlp-server
chain
was
stringbuilder
fileopendialog
angular-i18n
python-rq
factorization
containstable
jersey-test-framework
serial-communication
notice
windows-phone-8-emulator
dnvm
clearquest
stereotype
ultraedit
skview
nexusdb
backtrace
fxmlloader
diffmerge
sat4j
rpt
angular-file-upload
ant-contrib
sendy
nvcc
grunt-wiredep
misfire-instruction
myrrix
mobile-robots
ie-developer-tools
aspnet-compiler
octokit
gmail-imap
antixsslibrary
ncml
idoc
bash4
datasheet
win-prolog
towerjs
ruby-1.9
datejs
session-hijacking
flexbuilder
digg
jquery-click-event
norton
fxcopcmd
simultaneous
google-local-search
lts
dynamic-scope
rpxnow
vista64

Resources

Encrypt Message