Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
set $piece()
|
|||
|---|---|---|---|
|
#18+
Прошу прокомментировать поведение cache в части соответствия стандартам MUMPS MSM Код: plaintext 1. 2. 3. M3-Lite Код: plaintext 1. 2. 3. Cache Код: plaintext 1. 2. 3. 4. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.02.2008, 21:10 |
|
||
|
set $piece()
|
|||
|---|---|---|---|
|
#18+
я не знаю, какой смысл вкладывается в $p(x,"",y) есть подозрение, что само выражение не по стандарту, и поэтому СУБД имеет право обработать его по своему усмотрению или вообще выдать ошибку :-) ИМХО Более осмысленное выражение USER>s str="a,b,c" s $p(str,",",8)="d" w str a,b,c,,,,,d USER>w $zv Cache for Windows (Intel) 5.2 (Build 329) Thu Jun 15 2006 16:40:08 EDT отрабатывается ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.02.2008, 05:33 |
|
||
|
set $piece()
|
|||
|---|---|---|---|
|
#18+
Правы MSM и M3-Lite, Cache - нет, согласно 1995 Version of ANSI (Equivalent to Current ISO Version) of StandardFor each setleft that is a setpiece, of the form $Piece(glvn,d,m,n), the value of expr replaces the mth through the nth pieces of the current value of the glvn, where the value of d is the piece delimiter. Note that both m and n are optional. If neither is present, then m = n = 1; if only m is present, then n = m. If glvn has no current value, the empty string is used as its current value. Note that the current value of glvn is obtained just prior to replacing it. That is, the other arguments of setpiece are evaluated in left-to-right order, and the expr to the right of the = is evaluated prior to obtaining the value of glvn. Let s be the current value of glvn, k be the number of occurrences of d in s, that is, k = max(0,$Length(s,d) - 1), and t be the value of expr. The following cases are defined, using the concatenation operator _ of 7.2.1.1: m > n or n < 1. The glvn is not changed and does not change the naked indicator. n '< m–1 > k. The value in glvn is replaced by s_F(m–1-k)_t, where F(x) denotes a string of x occurrences of d, when x > 0; otherwise, F(x) = "". In either case, glvn affects the naked indicator. m–1 '> k < n. The value in glvn is replaced by $P(s,d,1,m–1)_F(min(m–1,1))_t. Otherwise, The value in glvn is replaced by $P(s,d,1,m–1)_F(min(m–1,1))_t_d_$P(s,d,n+1,k+1). Цитирую по The Annotated MUMPS Standards. Ed de Moel. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.02.2008, 15:44 |
|
||
|
set $piece()
|
|||
|---|---|---|---|
|
#18+
С другой стороны, Код: plaintext для любых str, n и m И наверно вопрос сводится к тому сколько number of occurrences of "" in s. Или сколько в строке пустых подстрок. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.02.2008, 17:37 |
|
||
|
set $piece()
|
|||
|---|---|---|---|
|
#18+
Number of occurrences, по определению: Стандарт... k be the number of occurrences of d in s, that is, k = max(0,$Length(s,d) - 1)$Length(s,"") = 0 => k = max(0, -1) => k = 0. При m>1 имеем m-1 > k, т.е. попадаем в условия варианта: Стандартn '< m–1 > k. The value in glvn is replaced by s_F(m–1-k)_t, where F(x) denotes a string of x occurrences of d, when x > 0; otherwise, F(x) = "".Имеем F(m-1-k)="", поэтому результат равен s_t. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2008, 13:55 |
|
||
|
|

start [/forum/topic.php?fid=39&fpage=73&tid=1558977]: |
0ms |
get settings: |
10ms |
get forum list: |
19ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
51ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
54ms |
get tp. blocked users: |
2ms |
| others: | 254ms |
| total: | 413ms |

| 0 / 0 |
