Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add string handling to help function, fixes a crash introduced by any-ty... #718

Merged
merged 1 commit into from Mar 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 21 additions & 2 deletions tests/help.red
Expand Up @@ -41,7 +41,7 @@ Other useful functions:
q or quit - leave the Red console
}
]
datatype? get :word [ ;-- HELP <datatype!>
all [word? word datatype? get :word] [ ;-- HELP <datatype!>
type: get :word
foreach w system/words [
if type = type? get w [
Expand All @@ -52,7 +52,7 @@ Other useful functions:

either any [
string? desc: spec/1
string? desc: spec/2 ;-- attributs block case
string? desc: spec/2 ;-- attributes block case
][
print ["^-=> " desc]
][
Expand All @@ -69,6 +69,25 @@ Other useful functions:
]
]
]
string? word [
foreach w system/words [
if any [function? get w native? get w action? get w op? get w][
spec: spec-of get w
if any [find form w word find form spec word] [
prin [tab w]

either any [
string? desc: spec/1
string? desc: spec/2 ;-- attributes block case
][
print ["^-=> " desc]
][
prin lf
]
]
]
]
]
'else [
func-name: :word

Expand Down