annotate scripts/control/c2d.m @ 3238:041ea33fbbf4

[project @ 1999-03-26 17:48:16 by jwe]
author jwe
date Fri, 26 Mar 1999 17:48:35 +0000
parents 98e15955107e
children f7e4a95916f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
1 # Copyright (C) 1993, 1994, 1995 John W. Eaton
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
2 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
3 # This file is part of Octave.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
4 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
5 # Octave is free software; you can redistribute it and/or modify it
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
6 # under the terms of the GNU General Public License as published by the
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
7 # Free Software Foundation; either version 2, or (at your option) any
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
8 # later version.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
9 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
10 # Octave is distributed in the hope that it will be useful, but WITHOUT
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
13 # for more details.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
14 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
15 # You should have received a copy of the GNU General Public License
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
16 # along with Octave; see the file COPYING. If not, write to the Free
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
17 # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
18
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
19 function dsys = c2d (sys, opt, T)
245
16a24e76d6e0 [project @ 1993-12-03 02:00:15 by jwe]
jwe
parents: 203
diff changeset
20
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
21 # Usage: dsys = c2d (sys[, T])
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
22 # Usage: dsys = c2d (sys[, opt[, T]])
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
23 # inputs:
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
24 # sys: system data structure (may be mixed discrete/continiuous time)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
25 # optional arguments:
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
26 # opt: conversion option:
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
27 # "ex" - use the matrix exponential (default)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
28 # "bi" - use the bilinear transformation
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
29 # 2(z-1)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
30 # s = -----
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
31 # T(z+1)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
32 # FIXME: This option exits with an error if sys is not purely
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
33 # continuous. (The ex can handle mixed systems.)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
34 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
35 # T: sampling time; required if sys is purely continuous.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
36 # outputs:
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
37 # dsys: discrete time equivalent via zero-order hold, sample each T sec.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
38 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
39 # converts the system described by:
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
40 # .
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
41 # x = Ac x + Bc u
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
42 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
43 # into a discrete time equivalent model via the matrix exponential
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
44 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
45 # x[n+1] = Ad x[n] + Bd u[n]
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
46 #
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
47 # Note: This function adds _d to the names of the new discrete states.
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
48
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
49 # Written by R.B. Tenison (btenison@eng.auburn.edu)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
50 # October 1993
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
51 # Updated by John Ingram for system data structure August 1996
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
52
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
53 save_val = implicit_str_to_num_ok; # save for later
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
54 implicit_str_to_num_ok = 1;
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
55
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
56 # parse input arguments
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
57 if(nargin < 1 | nargin > 3)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
58 usage("dsys=c2d(sys[,T])");
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
59 elseif (!is_struct(sys))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
60 error("sys must be a system data structure");
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
61 elseif (nargin == 1)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
62 opt = "ex";
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
63 elseif (nargin == 2 & !isstr(opt) )
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
64 T = opt;
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
65 opt = "ex";
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
66 endif
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
67
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
68 # check if sampling period T was passed.
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
69 Ts = sysgettsam(sys);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
70 if(!exist("T"))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
71 T = Ts;
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
72 if(T == 0)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
73 error("sys is purely continuous; no sampling period T provided");
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
74 endif
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
75 elseif (T != Ts & Ts > 0)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
76 warning(["c2d: T=",num2str(T),", system tsam==",num2str(Ts), ...
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
77 ": using T=", num2str(min(T,Ts))]);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
78 T = min(T,Ts);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
79 endif
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
80
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
81 if (!is_sample(T))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
82 error("sampling period T must be a postive, real scalar");
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
83 elseif( ! (strcmp(opt,"ex") | strcmp(opt,"bi") ) )
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
84 error(["illegal option passed: ",opt])
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
85 endif
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
86
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
87 sys = sysupdate(sys,"ss");
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
88 [n,nz,m,p] = sysdimensions(sys);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
89
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
90 if (n == 0)
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
91 warning("c2d: sys has no continuous states; setting outputs to discrete");
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
92 dsys = syssetsignals(sys,"yd",ones(1:p));
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
93 elseif(strcmp(opt,"ex"))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
94 # construct new state-space (a,b,c,d) for continuous subsystem
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
95 [csys,Acd] = syscont(sys); # extract continuous subsystem
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
96 [csys_a, csys_b, csys_c, csys_d] = sys2ss(csys);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
97 [ sys_a, sys_b, sys_c, sys_d] = sys2ss( sys);
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
98 if(isempty(Acd)) Bmat = sys_b;
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
99 elseif(isempty(csys_b)) Bmat = Acd;
3238
041ea33fbbf4 [project @ 1999-03-26 17:48:16 by jwe]
jwe
parents: 3236
diff changeset
100 else Bmat = [Acd, csys_b]; endif
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
101
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
102 row_zer = columns(Bmat);
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
103 csysn = sysdimensions(csys);
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
104 col_zer = csysn + row_zer;
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
105
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
106 [csysa,csysb,csysc,csysd] = sys2ss(csys);
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
107 if(isempty(Bmat) )
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
108 warning("c2d: no inputs to continuous subsystem.");
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
109 mat = csysa;
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
110 else
3238
041ea33fbbf4 [project @ 1999-03-26 17:48:16 by jwe]
jwe
parents: 3236
diff changeset
111 mat = [csysa, Bmat ; zeros( row_zer,col_zer) ];
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
112 endif
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
113
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
114 matexp = expm(mat * T);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
115
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
116 Abar = matexp( 1:csysn , 1:(csysn + columns(Acd)) );
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
117 Bbar = matexp( 1:csysn , (columns(Abar) + 1):columns(matexp) );
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
118
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
119 newnz = rows(Abar);
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
120 outlist = ones(1,rows(csysc));
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
121 [stnames,innames,outnames] = sysgetsignals(csys);
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
122 dsys = ss2sys(Abar,Bbar,csysc,csysd,T,0,newnz,stnames,innames, ...
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
123 outnames,outlist);
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
124 # rename states
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
125 for ii=1:newnz
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
126 strval = sprintf("%s_d",sysgetsignals(dsys,"st",ii,1));
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
127 dsys = syssetsignals(dsys,"st",strval,ii);
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
128 endfor
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
129
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
130 elseif(strcmp(opt,"bi"))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
131 if(is_digital(sys))
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
132 error("c2d: system is already digital")
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
133 else
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
134 # convert with bilinear transform
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
135 [a,b,c,d,tsam,n,nz,stname,inname,outname,yd] = sys2ss(sys);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
136 IT = (2/T)*eye(size(a));
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
137 A = (IT+a)/(IT-a);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
138 iab = (IT-a)\b;
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
139 tk=2/sqrt(T);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
140 B = tk*iab;
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
141 C = tk*(c/(IT-a));
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
142 D = d + (c*iab);
3228
dbcc24961c44 [project @ 1998-12-09 18:42:12 by jwe]
jwe
parents: 3213
diff changeset
143 stnamed = strappend(stname,"_d");
3213
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
144 dsys = ss2sys(A,B,C,D,T,0,rows(A),stnamed,inname,outname);
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
145 endif
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
146 else
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
147 error(["Bad option=",opt])
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
148 endif
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
149
ba1c7cdc6090 [project @ 1998-11-06 16:15:36 by jwe]
jwe
parents: 2847
diff changeset
150 implicit_str_to_num_ok = save_val; # restore value
203
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
151
5652a6bca14c [project @ 1993-11-08 21:56:05 by jwe]
jwe
parents:
diff changeset
152 endfunction