▼ |  | Dr Racket Plugins

1 | Implementing Dr Racket Plugins
2 | Adding Languages to Dr Racket
3 | Creating New Kinds of Dr Racket Frames
4 | Extending the Existing Dr Racket Classes
5 | Expanding the User’s Program Text and Breaking
6 | Editor Modes
7 | Language-Specific Capabilities
8 | Check Syntax
9 | Teaching Languages
10 | drracket: get/ extend
11 | drracket: unit
12 | drracket: language
13 | drracket: language-configuration
14 | drracket: debug
15 | drracket: rep
16 | drracket: frame
17 | drracket: help-desk
18 | drracket: eval
19 | drracket: modes
20 | drracket: module-language-tools
21 | drracket: module-language
22 | Backwards Compatibility
| Index

On this page:

htdp-save-file-prefix
htdp-file-prefix?

top ← prev up next →

### 9`` Teaching Languages

The teaching language are implemented via the tools interface and thus not part of DrRacket proper, but one helper library is documented here.

(require lang/htdp-langs-save-file-prefix)

> > value

> > htdp-save-file-prefix : (listof string?)

These strings are used as the prefix in a file saved while using the teaching languages. Each string is on a separate line in the saved file.

> > procedure

> > (htdp-file-prefix? ip) → boolean?

> ip : input-port?

Determines if the contents of ip is one of the possible prefixes that DrRacket saves at the beginning of a teaching language file.

In the case that this function returns #t, it consumes the entire prefix from ip (and discards it). In the case that this function returns #f, it does not consume anything from ip.

top ← prev up next →