Subversion Repositories wimsdev

Rev

Rev 15402 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15402 Rev 18396
Line 1... Line 1...
1
!if $wims_read_parm!=slib_header
1
!if $wims_read_parm!=slib_header
2
  !goto proc
2
  !goto proc
3
!endif
3
!endif
4
 
4
 
5
slib_author=Fabrice, Guerimand
5
slib_author=Fabrice, Guerimand
6
!!201904 : rajout option tex (par Gilles Marbeuf)
6
!!201904: rajout option tex (par Gilles Marbeuf)
7
!!202007 : change space by   in html mode (by FG)
7
!!202007: change space by   in html mode (by FG)
8
 
-
 
-
 
8
!!202408: treate some cases with input of the form e+6
9
slib_example=4345678\
9
slib_example=4345678\
10
4345678,tex\
10
4345678,tex\
11
5678\
11
5678\
12
5678,tex\
12
5678,tex\
13
5 234\
13
5 234\
Line 15... Line 15...
15
456.789567\
15
456.789567\
16
456.789567,tex\
16
456.789567,tex\
17
456.789567,comma\
17
456.789567,comma\
18
456.789567,comma tex\
18
456.789567,comma tex\
19
[897456,789],comma\
19
[897456,789],comma\
20
[897456,789],comma tex
20
[897456,789],comma tex\
-
 
21
8.1e+09\
-
 
22
8.1E+09\
-
 
23
8.1897667e+05\
-
 
24
8.1e-05
21
!exit
25
!exit
22
 
26
 
23
:proc
27
:proc
24
slib_input=$(wims_read_parm[1])
28
slib_input=$(wims_read_parm[1])
25
slib_input=!declosing $slib_input
29
slib_input=!declosing $slib_input
Line 35... Line 39...
35
!else
39
!else
36
  !if html isin $wims_read_parm
40
  !if html isin $wims_read_parm
37
    slib_sep= 
41
    slib_sep= 
38
  !endif
42
  !endif
39
!endif
43
!endif
40
 
-
 
41
slib_test=$[$slib_input]
44
slib_test=$[$slib_input]
42
!if NaN isin $slib_test
45
!if NaN isin $slib_test
43
  slib_out=NaN
46
  slib_out=NaN
44
  !exit
47
  !exit
45
!endif
48
!endif
-
 
49
!if e isin $slib_input or E isin $slib_input
-
 
50
  !set slib_input=!exec pari $slib_input
46
 
51
!endif
-
 
52
!!does not work always !!
47
!if e isin $slib_input
53
!if e isin $slib_input
48
  slib_out=$slib_input
54
  slib_out=$slib_input
49
  !exit
55
  !exit
50
!endif
56
!endif
51
slib_input=!nospace $slib_input
57
slib_input=!nospace $slib_input
Line 61... Line 67...
61
  slib_tmp=!char $[$slib_nbchi-3*($slib_nbgrp-$slib_i)+1] to $[$slib_nbchi-3*($slib_nbgrp-$slib_i-1)] of $slib_part
67
  slib_tmp=!char $[$slib_nbchi-3*($slib_nbgrp-$slib_i)+1] to $[$slib_nbchi-3*($slib_nbgrp-$slib_i-1)] of $slib_part
62
  slib_out=$slib_out$slib_sep$slib_tmp
68
  slib_out=$slib_out$slib_sep$slib_tmp
63
!next slib_i
69
!next slib_i
64
 
70
 
65
slib_tst=!itemcnt $slib_decomp
71
slib_tst=!itemcnt $slib_decomp
66
!if $slib_tst=1
72
!if $slib_tst=1 or $(slib_decomp[2])=0
67
  slib_out=!singlespace $slib_out
73
  slib_out=!singlespace $slib_out
68
  !exit
74
  !exit
69
!endif
75
!endif
70
slib_part=!item 2 of $slib_decomp
76
slib_part=!item 2 of $slib_decomp
71
slib_nbchi=!charcnt $slib_part
77
slib_nbchi=!charcnt $slib_part