2018-12-30 16:43:04 -08:00
|
|
|
---
|
|
|
|
|
title: system / replace_program
|
|
|
|
|
---
|
2023-11-25 09:50:24 -08:00
|
|
|
# replace_program
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### NAME
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
replace_program() - replaces the program in this_object()
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### SYNOPSIS
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
void replace_program( string str );
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### DESCRIPTION
|
2018-12-30 16:59:01 -08:00
|
|
|
|
2018-12-30 16:43:04 -08:00
|
|
|
replace_program() replaces the program in this_object() with that of an
|
|
|
|
|
object it inherits. The string argument is the filename of the object
|
|
|
|
|
whose program is to be used. Once the replacement takes place, the
|
|
|
|
|
current object effectively becomes a clone of that other object, but
|
|
|
|
|
with its current filename and global variable values. The program is
|
|
|
|
|
not actually replaced until the current execution is completed.
|
|
|
|
|
|
|
|
|
|
### SEE ALSO
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
clone_object(3), new(3)
|
2019-10-19 01:03:49 -07:00
|
|
|
|