Generic FunctionPackage: ddeToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

convert-returned-dde-string

Arguments: port string

This generic function is called by default whenever an Allegro CL application is acting as a DDE client, and has called send-request. Its purpose is to convert a single lisp string that is received from the DDE server into a value that is more directly useful by the lisp application.

This generic function is not to be called by an application, but an application may want to add methods for particular DDE client ports, depending on the form of the data passed by the particular DDE server.

port is the DDE port on which send-request was called.

string is the string to convert.

To handle typical DDE implementations, the default method divides the string into a number of substrings wherever the string is delimited by either a tab character or a newline character. It then returns a list of these substrings. A custom method could be supplied either if it is inappropriate to divide the string in this way, or to convert the string into non-string objects in some way.

Note that not all DDE servers return data as null-terminated strings. Some servers, for example, return a vector of longwords terminated by a zero longword. In this case, the Allegro CL application should supply a method for the related generic function convert-returned-dde-buffer, and bypass convert-returned-dde-string entirely.

Here is the default method:

(defmethod convert-returned-dde-string ((port client-port) string)
  (setq string (string-right-trim '(#\tab #\newline) string))
  (if* (find #\tab string)
     then (if* (find #\newline string)
             then (mapcar (lambda (s)
                            (delimited-string-to-list s #\tab))
                    (delimited-string-to-list string #\newline))
             else (delimited-string-to-list string #\tab))
     else (delimited-string-to-list string #\newline)))

See dde.htm for information about DDE support.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version