Add tags

Add tags to the following comment
ジュースを複数のグラスに注ぎ分ける時と同じような考え方です。
投稿間際に確認したところ、ところてん さんと同じ手法のようですね。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 入力される値が2byte文字のみと仮定
#module
#deffunc divid str _target, int num
    if (num <= 0) : return

    target = _target
    dim result, num
    count = 0
    repeat strlen(target) >> 1
        result(count) += 2
        count++
        if(count == num) : count = 0
    loop
    count = 0
    repeat num
        mes strmid(target, count, result(cnt))
        count += result(cnt)
    loop
    return
#global
    sample = "ゆめよりもはかなき世のなかをなげきわびつゝあかしくらすほどに四月十よひにもなりぬれば木のしたくらがりもてゆく"
    divid sample, 4
    divid sample, 5
    divid sample, 6

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...