- Timestamp:
- 07/21/06 14:47:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/STRING/chkeywd.html
r138 r142 696 696 </div> 697 697 698 <div id="file_comments"></div> 698 <div id="file_comments"> 699 In a string containing an order to executewith EXECUTE by example. 700 We change the value of one of keywords. 701 More generally, in a string, we look for the caracter chain: ', keywdname= ..., 702 and we change the value of... 703 </div> 699 704 700 705 … … 711 716 <div class="routine_details" id="_chkeywd"> 712 717 713 <h2><a class="top" href="#container">top</a>chkeywd </h2> 718 <h2><a class="top" href="#container">top</a>chkeywd <span class="categories"> 719 string, keywords 720 721 </span></h2> 714 722 715 723 <p class="header"> … … 717 725 718 726 <div class="comments"> 719 NAME: chkeywd (change keyword) 720 721 PURPOSE: ds un string qui contient une commande a executer avec 722 EXECUTE par ex. On change la valeur d''un des mot cle. 723 Plus generalement, ds un string, on cherche la chaine de 724 chacarteres: ', keywdname= ..., et on change la valeur de ... 725 726 CATEGORY: pour bidouiller des commandes passees par execute 727 728 CALLING SEQUENCE: stringout=chkeywd(stringin, keywdname, keywdvalue) 729 730 INPUTS: 731 stringin: un string 732 keywdname: un string designant le nom du mot clef a chercher. 733 keywdvalue: nouvelle valeur du mot clef a considerer ds stringin 734 735 KEYWORD PARAMETERS: 736 pour chercher le mot cle, on cherche le premier signe = qui 737 suit la position de keywdname. on substitue 738 pardefaut tout le bout de string qui suit jusqu''a la prochaine 739 virgule. avec les mots cles SEPARATOR et AFTER on peut modifier 740 cette decoupe du string: 741 SEPARATOR donne un chatactere avant (ou apres si AFTER est 742 active) lequel il faut chercher la virgule qui delimite le mot 743 cle ds le string. cf. les exemples 744 745 OUTPUTS:stringout=stringin modifie si keywdname a ete trouve ds 746 stringin 747 748 COMMON BLOCKS:common.pro 749 750 SIDE EFFECTS: 751 752 Si keywdvalue est un tableau, il sera convertit en vecteur. 753 754 RESTRICTIONS: 755 756 attention cette fonction comporte des boucles, des if et des cases 757 ds tous les sens. Elle ne doit donc pas etre utilisee avec des 758 mots clefs de grosse taille (avec bcp d''elements et avec des 759 elements etant de gros tableaux). 760 le mot clef en entree ne doit pas contenir de Complex floating, de 761 structure, de Double-precision complex, de Pointer, de Object 762 reference, de Unsigned Integer, de Unsigned Longword Integer, de 763 64-bit Integer, de Unsigned 64-bit Integer 764 765 EXAMPLE: 727 </div> 728 729 <h3>Return value</h3><div class="preformat"> 730 stringout=stringin modified if keywdname has been found in stringin 731 </div> 732 733 734 <h3>Parameters</h3> 735 736 737 <h4 id="_chkeywd_param_stringin">stringin 738 <span class="attr">in</span> 739 740 741 <span class="attr">required</span> 742 743 744 745 746 </h4> 747 748 <div class="comments"> 749 it is a string 750 </div> 751 752 <h4 id="_chkeywd_param_keywdname">keywdname 753 <span class="attr">in</span> 754 755 756 <span class="attr">required</span> 757 758 759 760 761 </h4> 762 763 <div class="comments"> 764 it is a string designating the name of keyword to look for. 765 </div> 766 767 <h4 id="_chkeywd_param_keywdvalue">keywdvalue 768 <span class="attr">in</span> 769 770 771 <span class="attr">required</span> 772 773 774 775 776 </h4> 777 778 <div class="comments"> 779 The new value of the keyword to considerate in STRINGIN 780 </div> 781 782 783 784 785 786 787 <h3>Keywords</h3> 788 789 <h4 id="_chkeywd_keyword_SEPARATOR">SEPARATOR 790 791 792 793 794 795 796 797 798 </h4> 799 800 <div class="comments"> 801 To look for the keyword, we look for the first sign = which follow 802 the position of keywdname. By default, we substitute the string 803 before the comma. With the keyword SEPARATOR,we can modify the cut 804 of the string. SEPARATOR give a caractere before the one we have to 805 look for the comma which delimit the keyword in the string. 806 (see examples) 807 </div> 808 809 <h4 id="_chkeywd_keyword_AFTER">AFTER 810 811 812 813 814 815 816 817 818 </h4> 819 820 <div class="comments"> 821 To look for the keyword, we look for the first sign = which follow 822 the position of keywdname. By default, we substitute the string 823 before the comma. With the keyword AFTER,we can modify the cut 824 of the string. AFTER give a caractere after the one we have to 825 look for the comma which delimit the keyword in the string. 826 (see examples) 827 </div> 828 829 830 831 <h3>Examples</h3><div class="preformat"> 766 832 767 833 IDL> b='ok=111, year=[1997,1998,1999], age_capitaine=35' … … 778 844 ok=111, year='c''est bon', /age_capitaine 779 845 </div> 780 781 782 783 784 <h3>Parameters</h3> 785 786 787 <h4 id="_chkeywd_param_stringin">stringin 788 789 790 791 792 793 794 795 796 </h4> 797 798 <div class="comments"></div> 799 800 <h4 id="_chkeywd_param_keywdname">keywdname 801 802 803 804 805 806 807 808 809 </h4> 810 811 <div class="comments"></div> 812 813 <h4 id="_chkeywd_param_keywdvalue">keywdvalue 814 815 816 817 818 819 820 821 822 </h4> 823 824 <div class="comments"></div> 825 826 827 828 829 830 831 <h3>Keywords</h3> 832 833 <h4 id="_chkeywd_keyword_SEPARATOR">SEPARATOR 834 835 836 837 838 839 840 841 842 </h4> 843 844 <div class="comments"></div> 845 846 <h4 id="_chkeywd_keyword_AFTER">AFTER 847 848 849 850 851 852 853 854 855 </h4> 856 857 <div class="comments"></div> 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 846 <h3>Version history</h3> 847 848 <h4>Version</h4><div class="preformat"> 849 $Id$ 850 </div> 851 <h4>History</h4><div class="preformat"></div> 852 853 854 <h3>Known issues</h3> 855 856 857 858 <h4>Restrictions</h4><div class="preformat"> 859 If keywdvalue is an array, it will be convert in a vector. 860 861 862 Beware, this function has loops, ifs ad cases everywhere. So it can 863 not be used by big keywords (with a lot of elements which are big 864 arrays). The input keyword must not contain Complex floatings, structure, 865 Double-precision complex, Pointer, Object reference, Unsigned Integer, 866 Unsigned Longword Integer, 64-bit Integer or Unsigned 64-bit Integer. 867 868 </div> 869 870 <h3>Other attributes</h3> 871 872 873 <h4>Uses routines</h4><div class="preformat"> 874 common.pro 875 </div> 878 876 879 877
Note: See TracChangeset
for help on using the changeset viewer.