1#############################################################################
2##
3##  This file is part of GAP, a system for computational discrete algebra.
4##  This file's authors include Steve Linton.
5##
6##  Copyright of GAP belongs to its developers, whose names are too numerous
7##  to list here. Please refer to the COPYRIGHT file for details.
8##
9##  SPDX-License-Identifier: GPL-2.0-or-later
10##
11##  This file contains a number of functions, or extensions of
12##  functions to certain numbers or combinations of arguments, which
13##  are now considered "deprecated" or "obsolescent", but which are presently
14##  included in the system to maintain backwards compatibility.
15##
16##  Procedures for dealing with this functionality are not yet completely
17##  agreed, but it will probably be removed from the system over
18##  several releases.
19##
20##  These functions should *NOT* be used in the GAP library.
21##
22##  For each variable name that appears in this file, information should be
23##  provided up to which version the name was documented, in which version
24##  it was added to this file and hence is regarded as ``obsolescent'',
25##  and in which version it is expected to be removed.
26##
27##  Concerning the distribution of code to `lib/obsolete.gd' and
28##  `lib/obsolete.gi', the following rule holds.
29##  Function declarations must be added to `lib/obsolete.gd', since the
30##  declaration part of packages may reference them.
31##  Also function bodies that rely only on variables declared in the
32##  declaration part of the GAP library can be added to `lib/obsolete.gd'.
33##  Only those method installations and function bodies must be added to
34##  `lib/obsolete.gd' that rely on variables declared in the implementation
35##  part of the GAP library.
36##
37##  <#GAPDoc Label="obsolete_intro">
38##  <Index>obsolete</Index>
39##  <Index>deprecated</Index>
40##  <Index>legacy</Index>
41##
42##  In general we try to keep &GAP;&nbsp;4 compatible with former releases
43##  as much as possible.
44##  Nevertheless,
45##  from time to time it seems appropriate to remove some commands
46##  or to change the names of some commands or variables.
47##  There are various reasons for that:
48##  Some functionality was improved and got another (hopefully better)
49##  interface,
50##  names turned out to be too special or too general for the underlying
51##  functionality,
52##  or names are found to be unintuitive or inconsistent with other names.
53##  <P/>
54##  In this chapter we collect such old names while pointing to the sections
55##  which explain how to substitute them.
56##  Usually, old names will be available for several releases;
57##  they may be removed when they don't seem to be used any more.
58##  <P/>
59##  Information about obsolete names is printed by <Ref Func="Info"/> using the
60##  InfoObsolete Info class. By default InfoObsolete is set to 1. Newly
61##  obsoleted identifiers should at first be outputted at info level 2. Once they
62##  have been removed from all packages, they should then be moved to info level
63##  1, so they are visible to normal users, for at least one major release before
64##  being removed.
65##  <P/>
66##  The functions DeclareObsoleteSynonym and DeclareObsoleteSynonymAttr take
67##  an optional final paremeter, specifying the info level at which the given
68##  obsolete symbol should be reported. It defaults to 1.
69##  <P/>
70##  The obsolete &GAP; code is collected in two library files,
71##  <F>lib/obsolete.gd</F> and <F>lib/obsolete.gi</F>.
72##  By default, these files are read when &GAP; is started.
73##  It may be useful to omit reading these files,
74##  for example in order to make sure that one's own &GAP; code does not rely
75##  on the obsolete variables.
76##  For that, one can use the <C>-O</C> command line option
77##  (see <Ref Label="Command Line Options"/>) or set the component
78##  <C>ReadObsolete</C> in the file <F>gap.ini</F> to <K>false</K>
79##  (see <Ref Sect="sect:gap.ini"/>). Note that <C>-O</C> command
80##  line option overrides <C>ReadObsolete</C>.
81##  <P/>
82##  (Note that the condition whether the library files with the obsolete
83##  &GAP; code shall be read has changed.
84##  In &GAP;&nbsp;4.3 and 4.4, the global variables <C>GAP_OBSOLESCENT</C>
85##  and <C>GAPInfo.ReadObsolete</C>
86##  &ndash;to be set in the user's <F>.gaprc</F> file&ndash;
87##  were used to control this behaviour.)
88##  <#/GAPDoc>
89##
90
91BIND_GLOBAL( "DeclareObsoleteSynonym", function( name_obsolete, name_current, level_arg... )
92    local value, orig_value, printed_warning, level;
93    if not ForAll( [ name_obsolete, name_current ], IsString ) then
94        Error("Each argument of DeclareObsoleteSynonym must be a string\n");
95    fi;
96    if Length(level_arg) = 0 then
97        level := 2;
98    else
99        level := level_arg[1];
100    fi;
101
102    value := EvalString( name_current );
103    if IsFunction( value ) then
104        orig_value := value;
105        printed_warning := false;
106        value := function (arg)
107            local res;
108            if not printed_warning and InfoLevel(InfoObsolete) >= level then
109                Info( InfoObsolete, level, "'", name_obsolete, "' is obsolete.",
110                    "\n#I  It may be removed in a future release of GAP.",
111                    "\n#I  Use ", name_current, " instead.");
112                printed_warning := true;
113            fi;
114            # TODO: This will error out if orig_value is a function which returns nothing.
115            #return CallFuncList(orig_value, arg);
116            res := CallFuncListWrap(orig_value, arg);
117            if Length(res) = 1 then
118                return res[1];
119            fi;
120        end;
121    fi;
122    BIND_GLOBAL( name_obsolete, value );
123end );
124
125BIND_GLOBAL( "DeclareObsoleteSynonymAttr", function( name_obsolete, name_current, level_arg... )
126    local level;
127    Assert(0, IsFunction( ValueGlobal( name_current ) ) );
128    level := 1;
129    if Length(level_arg) > 0 then
130        level := level_arg[1];
131    fi;
132    DeclareObsoleteSynonym( name_obsolete, name_current, level );
133    DeclareObsoleteSynonym( Concatenation("Set", name_obsolete), Concatenation("Set", name_current), level );
134    DeclareObsoleteSynonym( Concatenation("Has", name_obsolete), Concatenation("Has", name_current), level );
135end );
136
137
138#############################################################################
139##
140#F  DiagonalizeIntMatNormDriven(<mat>)  . . . . diagonalize an integer matrix
141##
142##  'DiagonalizeIntMatNormDriven'  diagonalizes  the  integer  matrix  <mat>.
143##
144##  It tries to keep the entries small  through careful  selection of pivots.
145##
146##  First it selects a nonzero entry for which the  product of row and column
147##  norm is minimal (this need not be the entry with minimal absolute value).
148##  Then it brings this pivot to the upper left corner and makes it positive.
149##
150##  Next it subtracts multiples of the first row from the other rows, so that
151##  the new entries in the first column have absolute value at most  pivot/2.
152##  Likewise it subtracts multiples of the 1st column from the other columns.
153##
154##  If afterwards not  all new entries in the  first column and row are zero,
155##  then it selects a  new pivot from those  entries (again driven by product
156##  of norms) and reduces the first column and row again.
157##
158##  If finally all offdiagonal entries in the first column  and row are zero,
159##  then it  starts all over again with the submatrix  '<mat>{[2..]}{[2..]}'.
160##
161##  It is  based  upon  ideas by  George Havas  and code by  Bohdan Majewski.
162##  G. Havas and B. Majewski, Integer Matrix Diagonalization, JSC, to appear
163##
164##  Moved to obsoletes in May 2003.
165##
166##  Not used in any redistributed package (01/2016)
167#DeclareGlobalFunction( "DiagonalizeIntMatNormDriven" );
168
169
170#############################################################################
171##
172#F  DeclarePackage( <name>, <version>, <tester> )
173#F  DeclareAutoPackage( <name>, <version>, <tester> )
174#F  DeclarePackageDocumentation( <name>, <doc>[, <short>[, <long> ] ] )
175#F  DeclarePackageAutoDocumentation( <name>, <doc>[, <short>[, <long> ] ] )
176#F  ReadPkg( ... )
177#F  RequirePackage( ... )
178##
179##  Up to GAP 4.3, these functions were needed inside the `init.g' files
180##  of GAP packages, whereas from GAP 4.4 on, the `PackageInfo.g' files
181##  are used instead.
182##  So they are needed only for those packages which have a `PackageInfo.g'
183##  file as well as an `init.g' file that works also with GAP 4.3
184##  (or older).
185##  They can be removed as soon as none of the available packages calls them.
186##
187
188#BindGlobal( "DeclarePackage", Ignore );
189# 09/2018: Not used in any redistributed package
190
191#BindGlobal( "DeclareAutoPackage", Ignore );
192# 06/2018: Not used in any redistributed package
193
194#BindGlobal( "DeclarePackageAutoDocumentation", Ignore );
195# 09/2018: Not used in any redistributed package
196
197#BindGlobal( "DeclarePackageDocumentation", Ignore );
198# 03/2018: Not used in any redistributed package
199
200DeclareObsoleteSynonym( "ReadPkg", "ReadPackage" );
201# 11/2018: still used in Hap (HapCocyclic)
202# safely used in GAP3 compatibility code: ctbllib, quagroup (09/2018)
203
204#DeclareObsoleteSynonym( "RequirePackage", "LoadPackage" );
205# 09/2018: not used in "general" code in any redistributed package
206# used in documentation or for generating it: edim, repsn (11/2018)
207# safely used in GAP3 compatibility code: ctbllib (09/2018)
208
209
210#############################################################################
211##
212#V  KERNEL_VERSION   - Not used in any redistributed package (11/2017)
213#V  VERSION          - Not used in any redistributed package (11/2018)
214#V  GAP_ARCHITECTURE - still used in gbnp (04/2019)
215#V  GAP_ROOT_PATHS   - Not used in any redistributed package (03/2018)
216#V  DEBUG_LOADING    - Not used in any redistributed package (04/2019)
217#V  BANNER           - Not used in any redistributed package (04/2019)
218#V  QUIET            - Not used in any redistributed package (04/2019)
219#V  LOADED_PACKAGES  - Not used in any redistributed package (11/2017)
220##
221##  Up to GAP 4.3,
222##  these global variables were used instead of the record `GAPInfo'.
223##
224#BindGlobal( "KERNEL_VERSION", GAPInfo.KernelVersion );
225#BindGlobal( "VERSION", GAPInfo.Version );
226BindGlobal( "GAP_ARCHITECTURE", GAPInfo.Architecture );
227#BindGlobal( "GAP_ROOT_PATHS", GAPInfo.RootPaths );
228#BindGlobal( "DEBUG_LOADING", GAPInfo.CommandLineOptions.D );
229#BindGlobal( "BANNER", not GAPInfo.CommandLineOptions.b );
230#BindGlobal( "QUIET", GAPInfo.CommandLineOptions.q );
231#BindGlobal( "LOADED_PACKAGES", GAPInfo.PackagesLoaded );
232
233#############################################################################
234##
235#V  PACKAGES_VERSIONS - Not used in any redistributed package (11/2017)
236#V  Revision          - still used in HAPcryst (04/2019)
237#BindGlobal( "PACKAGES_VERSIONS", rec() );
238BindGlobal( "Revision", rec() );
239
240#############################################################################
241##
242#V  TRANSDEGREES
243##
244##  This variable was used by the GAP Transitive Groups Library before it
245##  became a separate TransGrp package. It denoted the maximal degree of
246##  transitive permutation groups provided by that library.
247##
248##  In the TransGrp package, this information is provided by the boolean
249##  list TRANSAVAILABLE, which indicates availability for each possible
250##  degree (this is necessary because the data for some degrees may have
251##  to be downloaded separately).
252##
253##  At the time of writing this comment, the TransGrp package contained
254##  representatives for all transitive permutation groups of degree at
255##  most 47, with degree 32 needing to be downloaded separately.
256##
257##  Still used in ctbllib (11/2018)
258BindGlobal( "TRANSDEGREES", 30 );
259
260#############################################################################
261##
262#A  NormedVectors( <V> )
263##
264##  Moved to obsoletes in May 2003.
265##  Still used in matgrp (11/2018)
266##  used in documentation or for generating it: ctbllib (11/2018)
267##
268DeclareObsoleteSynonymAttr( "NormedVectors", "NormedRowVectors" );
269
270#############################################################################
271##
272#F  SameBlock( <tbl>, <p>, <omega1>, <omega2>, <relevant>, <exponents> )
273##
274##  (the next three paragraphs were added in July 2003)
275##
276##  Let <tbl> be an ordinary character table, <p> a prime integer, <omega1>
277##  and <omega2> two central characters (or their values lists) of <tbl>.
278##  The remaining arguments <relevant> and <exponents> are lists as stored in
279##  the components `relevant' and `exponents' of a record returned by
280##  `PrimeBlocks' (see~"PrimeBlocks").
281##
282##  `SameBlock' returns `true' if <omega1> and <omega2> are equal modulo any
283##  maximal ideal in the ring of complex algebraic integers containing the
284##  ideal spanned by <p>, and `false' otherwise.
285##
286##  The above syntax was supported and documented in GAP 4.3.
287##  In GAP 4.4, the first and the last argument were omitted because they
288##  turned out to be unnecessary.  (The record returned by `PrimeBlocks' does
289##  no longer have a component `exponents'.)
290##  From GAP 4.5 on, only the four argument version will be supported.
291##
292
293
294#############################################################################
295##
296#F  CharValueWreathSymmetric( <tbl>, <n>, <beta>, <pi> )  . .
297#F                                        . . . .  character value in G wr Sn
298##
299##  This function was never documented but had been available for decades.
300##  Its functionality became documented under the more suitable name
301##  'CharacterValueWreathSymmetric' in GAP 4.10.
302##
303##  Not used in any redistributed package (11/2018)
304#DeclareObsoleteSynonym( "CharValueWreathSymmetric",
305#    "CharacterValueWreathSymmetric" );
306
307
308#############################################################################
309##
310#O  FormattedString( <obj>, <nr> )  . . formatted string repres. of an object
311##
312##  This variable name was never documented and is obsolete.
313##  (It had been introduced at a time when only unary methods were allowed
314##  for attributes.)
315##
316##  Moved to obsolete in Dec 2007.
317##  Still used in ctbllib, gbnp (11/2018)
318DeclareObsoleteSynonym( "FormattedString", "String" );
319
320
321#############################################################################
322##
323##  In June 2009, `IsTuple' was renamed to `IsDirectProductElement'.
324##  The following names should be still available and regarded as obsolescent
325##  in GAP 4.5, and should be removed in GAP 4.6.
326##
327#F  IsTuple( ... ) - Not used in any redistributed package (11/2017)
328#F  Tuple( ... ) - still used in numericalsgps (11/2018)
329##
330#DeclareObsoleteSynonym( "IsTuple", "IsDirectProductElement" );
331DeclareObsoleteSynonym( "Tuple", "DirectProductElement" );
332
333
334#############################################################################
335##
336#F  StateRandom()
337#F  RestoreStateRandom(<obj>)
338##
339##  <ManSection>
340##  <Func Name="StateRandom" Arg=''/>
341##  <Func Name="RestoreStateRandom" Arg='obj'/>
342##
343##  <Description>
344##  [This interface to the global random generator is kept for compatibility
345##  with older versions of &GAP;. Use now <C>State(GlobalRandomSource)</C>
346##  and <C>Reset(GlobalRandomSource, <A>obj</A>)</C> instead.]
347##  <P/>
348##  For debugging purposes, it can be desirable to reset the random number
349##  generator to a state it had before. <Ref Func="StateRandom"/> returns a
350##  &GAP; object that represents the current state of the random number
351##  generator used by <Ref Func="RandomList"/>.
352##  <P/>
353##  By calling <Ref Func="RestoreStateRandom"/> with this object as argument,
354##  the random number is reset to this same state.
355##  <P/>
356##  (The same result can be obtained by accessing the two global variables
357##  <C>R_N</C> and <C>R_X</C>.)
358##  <P/>
359##  (The format of the object used to represent the random generator seed
360##  is not guaranteed to be stable between different machines or versions
361##  of &GAP;.)
362##  <P/>
363##  <Example><![CDATA[
364##  gap> seed:=StateRandom();;
365##  gap> List([1..10],i->Random(Integers));
366##  [ -3, 2, 5, 1, 0, -2, 4, 3, 5, 3 ]
367##  gap> List([1..10],i->Random(Integers));
368##  [ 1, -2, 1, -1, -2, 4, -1, -3, -1, 1 ]
369##  gap> RestoreStateRandom(seed);
370##  gap> List([1..10],i->Random(Integers));
371##  [ -3, 2, 5, 1, 0, -2, 4, 3, 5, 3 ]
372##  ]]></Example>
373##  </Description>
374##  </ManSection>
375##
376############################################################################
377##  Compatibility functions, these are documented for a long time.
378##  (We also keep the global variables R_N and R_X within the
379##  'GlobalRandomSource' because they were documented.)
380##
381# BindGlobal( "StateRandom", function()
382#   return State(GlobalRandomSource);
383# end);
384#
385# BindGlobal( "RestoreStateRandom", function(seed)
386#   Reset(GlobalRandomSource, seed);
387# end);
388
389# older documentation referred to `StatusRandom'.
390#DeclareObsoleteSynonym( "StatusRandom", "StateRandom" );
391
392# synonym formerly declared in factgrp.gd.
393# Moved to obsoletes in October 2011
394# Not used in any redistributed package (11/2017)
395#DeclareObsoleteSynonym( "FactorCosetOperation", "FactorCosetAction" );
396
397# synonym retained for backwards compatibility with GAP 4.4.
398# Moved to obsoletes in April 2012.
399# Still used in hap (11/2018)
400DeclareObsoleteSynonym( "Complementclasses", "ComplementClassesRepresentatives" );
401
402
403#############################################################################
404##
405#O  ShrinkCoeffs( <list> )
406##
407##  Moved to obsoletes in June 2010
408##
409##  <ManSection>
410##  <Oper Name="ShrinkCoeffs" Arg='list'/>
411##
412##  <Description>
413##  removes trailing zeroes from <A>list</A>.
414##  It returns the position of the last non-zero entry,
415##  that is the length of <A>list</A> after the operation.
416##  <Example><![CDATA[
417##  gap> l:=[1,0,0];;ShrinkCoeffs(l);l;
418##  1
419##  [ 1 ]
420##  ]]></Example>
421##  </Description>
422##  </ManSection>
423##
424##  Not used in any redistributed package (11/2017)
425#DeclareOperation( "ShrinkCoeffs", [ IsMutable and IsList ] );
426
427
428#############################################################################
429##
430#F  ExcludeFromAutoload( ... )
431##
432##  was supported until GAP 4.4, obsolescent in GAP 4.5.
433##
434##  Not used in any redistributed package (01/2016)
435# BindGlobal( "ExcludeFromAutoload", function( arg )
436#     Info( InfoWarning, 1,
437#           "the function `ExcludeFromAutoload' is not supported anymore,\n",
438#           "#I  use the component `ExcludeFromAutoload' in `gap.ini'\n",
439#           "#I  instead" );
440#     end );
441
442
443#############################################################################
444##
445#V  POST_RESTORE_FUNCS
446##
447##  were supported until GAP 4.4, obsolescent in GAP 4.5.
448##
449##  Not used in any redistributed package (11/2018)
450#POST_RESTORE_FUNCS:= GAPInfo.PostRestoreFuncs;
451
452
453#############################################################################
454##
455#O  TeXObj( <obj> ) . . . . . . . . . . . . . . . . . . . . . . TeX an object
456##
457##  <ManSection>
458##  <Oper Name="TeXObj" Arg='obj'/>
459##
460##  <Description>
461##  </Description>
462##  </ManSection>
463##
464##  Not used in any redistributed package (11/2018)
465##  Still used in the GAP library (11/2018)
466DeclareOperation( "TeXObj", [ IS_OBJECT ] );
467
468
469#############################################################################
470##
471#O  LaTeXObj( <obj> ) . . . . . . . . . . . . . . . . . . . . LaTeX an object
472##
473##  <ManSection>
474##  <Oper Name="LaTeXObj" Arg='obj'/>
475##
476##  <Description>
477##  The function <Ref Func="LaTeX"/> actually calls the operation
478##  <Ref Func="LaTeXObj"/> for each argument.
479##  By installing special methods for this operation, it is possible
480##  to achieve special &LaTeX;'ing behavior for certain objects
481##  (see Chapter&nbsp;<Ref Chap="Method Selection"/>).
482##  </Description>
483##  </ManSection>
484##
485##  Not used in any redistributed package (11/2018)
486##  Still used in the GAP library (11/2018)
487DeclareOperation( "LaTeXObj", [ IS_OBJECT ] );
488
489
490#############################################################################
491##
492#F  ConnectGroupAndCharacterTable( <G>, <tbl>[, <info>] )
493##
494##  This function was supported up to GAP 4.4.12.
495##  It is deprecated because it changes its arguments, which is a bad idea.
496##  Note that after a successful call of `ConnectGroupAndCharacterTable',
497##  one cannot use <tbl> in another call with another group <G>.
498##
499##  Moreover, if <tbl> is a character table from GAP's table library (which
500##  is probably the most usual application) then the following may happen.
501##  One fetches the table <tbl> with `CharacterTable',
502##  then stores the group information with `ConnectGroupAndCharacterTable',
503##  then performs some computations with this table and perhaps with other
504##  tables,
505##  and finally one fetches <tbl> again with `CharacterTable'; depending on
506##  the intermediate computations, this table can be the old instance, with
507##  the (unwanted) stored group information.
508##
509##  In GAP 4.5, one can use the function `CharacterTableWithStoredGroup'
510##  instead of `ConnectGroupAndCharacterTable'.
511##
512##  Not used in any redistributed package (01/2016)
513#DeclareGlobalFunction( "ConnectGroupAndCharacterTable" );
514
515
516#############################################################################
517##
518#F  MutableIdentityMat( <m> [, <F>] ) mutable identity matrix of a given size
519##
520##  <#GAPDoc Label="MutableIdentityMat">
521##  <ManSection>
522##  <Func Name="MutableIdentityMat" Arg='m [, F]'/>
523##
524##  <Description>
525##  returns a (mutable) <A>m</A><M>\times</M><A>m</A> identity matrix over the field given
526##  by <A>F</A>.
527##  This is identical to <Ref Func="IdentityMat"/> and is present in &GAP;&nbsp;4.1
528##  only for the sake of compatibility with beta-releases.
529##  It should <E>not</E> be used in new code.
530##  </Description>
531##  </ManSection>
532##  <#/GAPDoc>
533##
534##  Not used in any redistributed package (11/2018)
535#DeclareObsoleteSynonym( "MutableIdentityMat", "IdentityMat" );
536
537
538#############################################################################
539##
540#F  MutableNullMat( <m>, <n>  [, <F>] ) mutable null matrix of a given size
541##
542##  <#GAPDoc Label="MutableNullMat">
543##  <ManSection>
544##  <Func Name="MutableNullMat" Arg='m, n [, F]'/>
545##
546##  <Description>
547##  returns a (mutable) <A>m</A><M>\times</M><A>n</A> null matrix over the field given
548##  by <A>F</A>.
549##  This is identical to <Ref Func="NullMat"/> and is present in &GAP;&nbsp;4.1
550##  only for the sake of compatibility with beta-releases.
551##  It should <E>not</E> be used in new code.
552##  </Description>
553##  </ManSection>
554##  <#/GAPDoc>
555##
556##  Not used in any redistributed package (11/2018)
557#DeclareObsoleteSynonym( "MutableNullMat", "NullMat" );
558
559
560#############################################################################
561##
562#F  IsSemilatticeAsSemigroup( <S> ) is the semigroup <S> a semilattice
563##
564##  <ManSection>
565##  <Prop Name="IsSemilatticeAsSemigroup" Arg='S'/>
566##
567##  <Description>
568##    <C>IsSemilatticeAsSemigroup</C> returns <K>true</K> if the semigroup
569##    <A>S</A> is a semilattice and <K>false</K> if it is not. <P/>
570##
571##    A semigroup is a <E>semilattice</E> if it is commutative and every
572##    element is an idempotent. The idempotents of an inverse semigroup form a
573##    semilattice.
574##
575##    This is identical to <Ref Prop="IsSemilattice" BookName = "Semigroups"/> #
576##    and is present in &GAP;&nbsp;4.8 #  only for the sake of compatibility with
577##    beta-releases.  #  It should <E>not</E> be used in new code.
578##  </Description>
579##  </ManSection>
580##
581##  Not used in any redistributed packages (11/2017)
582#DeclareSynonymAttr( "IsSemilatticeAsSemigroup", IsSemilattice );
583
584#############################################################################
585##
586#F  CreateCompletionFiles( [<path>] ) . . . . . . create "lib/readX.co" files
587##
588##  NO LONGER SUPPORTED IN GAP >= 4.5
589##
590# BindGlobal( "CreateCompletionFiles", function()
591#   Print("CreateCompletionFiles: Completion files are no longer supported by GAP.\n");
592# end);
593
594
595#############################################################################
596##
597#O  MultRowVector( <list1>, <poss1>, <list2>, <poss2>, <mul> )
598##
599##  <#GAPDoc Label="MultRowVector_Obsolete">
600##  <ManSection>
601##  <Oper Name="MultRowVector" Arg='list1, [poss1, list2, poss2, ]mul'/>
602##  <Returns>nothing</Returns>
603##
604##  <Description>
605##  The two argument version of this operation is an obsolete synonym for
606##  <C>MultVectorLeft</C>, which calculates <A>mul</A>*<A>list1</A> in-place.
607##  New code should use <C>MultVectorLeft</C> or its synonym
608##  <C>MultVector</C> instead.
609##  <P/>
610##  <E>The five argument version of this operation is kept for compatibility
611##  with older versions of &GAP; and will be removed eventually.</E>
612##  It replaces
613##  <A>list1</A><C>[</C><A>poss1</A><C>[</C><M>i</M><C>]]</C> by
614##  <C><A>mul</A>*<A>list2</A>[<A>poss2</A>[</C><M>i</M><C>]]</C> for <M>i</M>
615##  between <M>1</M> and <C>Length( <A>poss1</A> )</C>.
616##  </Description>
617##  </ManSection>
618##  <#/GAPDoc>
619##
620##  Still used in fining, orb, polycyclic, recog (11/2018)
621DeclareObsoleteSynonym( "MultRowVector", "MultVector" );
622
623#############################################################################
624##
625#O  ReadTest
626##
627##  `ReadTest' is superseded by more robust and flexible `Test'. Since the
628##  former is still used in some packages, for backwards compatibility we
629##  replace it by the call of `Test' with comparison up to whitespaces.
630##
631##  Still used in ctbllib, cubefree, gbnp, hapcryst (04/2019)
632##  Safely used in compatibility code: gapdoc (09/2018)
633BindGlobal( "ReadTest", function( fn )
634  Print("#I  ReadTest is no longer supported. Please use more robust and flexible\n",
635        "#I  Test. For backwards compatibility, ReadTest(<filename>) is replaced\n",
636        "#I  by Test( <filename>, rec( compareFunction := \"uptowhitespace\" ))\n");
637  Test( fn, rec( compareFunction := "uptowhitespace" ));
638end);
639
640#############################################################################
641##
642#F  USER_HOME_EXPAND
643##
644##  This got a nicer name before is became documented.
645##
646##  Still used in ctbllib, Browse (04/2019)
647##  Safely used in compatibility code: digraphs, profiling, semigroups (09/2018)
648DeclareObsoleteSynonym( "USER_HOME_EXPAND", "UserHomeExpand" );
649
650#############################################################################
651##
652#F  RecFields
653##
654##  This name stems from GAP 3 days.
655##
656##  Still used in Browse (11/2018)
657##  Safely used in GAP3 compatibility code: ctbllib (11/2018)
658DeclareObsoleteSynonym( "RecFields", "RecNames" );
659
660#############################################################################
661##
662#F  SHALLOW_SIZE
663##
664##  'SHALLOW_SIZE' is an alias for the kernel function 'SIZE_OBJ'. Note that
665##  in the past, SIZE_OBJ was buggy for immediate inputs (i.e. small integers
666##  or finite field elements), hence packages using either of these
667##  UNDOCUMENTED kernel functions may wish to keep using SHALLOW_SIZE until
668##  they can adjust their minimal GAP version requirements.
669##
670##  Not used in any redistributed package (11/2018)
671#DeclareObsoleteSynonym( "SHALLOW_SIZE", "SIZE_OBJ" );
672
673
674#############################################################################
675##
676#V  InfoRead?
677##
678##  InfoRead used to be used to print when a file is read using `Read()`
679##
680##  Still used in gbnp (04/2019)
681if GAPInfo.CommandLineOptions.D then InfoRead1 := Print; fi;
682if not IsBound(InfoRead1) then InfoRead1 := Ignore; fi;
683if not IsBound(InfoRead2) then InfoRead2 := Ignore; fi;
684
685#############################################################################
686##
687#F  TemporaryGlobalVarName( [<prefix>] )   name of an unbound global variable
688##
689##  <ManSection>
690##  <Func Name="TemporaryGlobalVarName" Arg='[prefix]'/>
691##
692##  <Description>
693##  TemporaryGlobalVarName ( [<A>prefix</A>] ) returns a string that can be used
694##  as the name of a global variable that is not bound at the time when
695##  TemporaryGlobalVarName() is called.  The optional argument prefix can
696##  specify a string with which the name of the global variable starts.
697##  </Description>
698##  </ManSection>
699##
700##  Still used in anupq, SCSCP (04/2019)
701DeclareGlobalFunction("TemporaryGlobalVarName");
702
703
704#############################################################################
705##
706#F  HideGlobalVariables(<str1>[,<str2>,...]))
707##
708##  <ManSection>
709##  <Func Name="HideGlobalVariables" Arg='str1[,str2,...]'/>
710##
711##  <Description>
712##  temporarily makes global variables <Q>undefined</Q>. The arguments to
713##  <C>HideGlobalVariables</C> are strings. If there is a global variable defined
714##  whose identifier is equal to one of the strings it will be <Q>hidden</Q>.
715##  This means that identifier and value will be safely stored on a stack
716##  and the variable will be undefined afterwards. A call to
717##  <C>UnhideGlobalVariables</C> will restore the old values.
718##  The main purpose of hiding variables will be for the temporary creation
719##  of global variables for reading in data created by other programs.
720##  </Description>
721##  </ManSection>
722##
723##  This function was never documented.
724##
725##  Still used in anupq (04/2019)
726DeclareGlobalFunction("HideGlobalVariables");
727
728
729#############################################################################
730##
731#F  UnhideGlobalVariables(<str1>[,<str2>,...])
732#F  UnhideGlobalVariables()
733##
734##  <ManSection>
735##  <Func Name="UnhideGlobalVariables" Arg='str1[,str2,...]'/>
736##  <Func Name="UnhideGlobalVariables" Arg=''/>
737##
738##  <Description>
739##  The second version unhides all variables that are still hidden.
740##  </Description>
741##  </ManSection>
742##
743##  This function was never documented.
744##
745##  Still used in anupq (04/2019)
746DeclareGlobalFunction("UnhideGlobalVariables");
747
748
749#############################################################################
750##
751##
752##  Still used in Browse (06/2019)
753BindGlobal("STRING_LIST_DIR", function(dirname)
754    local list;
755
756    list:= LIST_DIR( dirname );
757    if list = fail then
758      return fail;
759    else
760      return JoinStringsWithSeparator( list, "\000" );
761    fi;
762end);
763