Thread Rating:
  • 478 Vote(s) - 2.82 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#t , any , Type の違いは?
09-13-2013, 02:52 PM,
#2
RE: #t , any , Type の違いは?
> ご存知の型 --> ご存知の方? Smile


”#t”の中の t 自体は変数名でしょう? よく見られるのが、パラメータ化クラス定義ですね。
例:
{define-class public {Array-of t:Type}
|| body of class
}

パラメータの型はType型です、すなわち、任意のデータ型を指定することができる。このパラメータtの値(Stringやintなど、Curlの認識できる型ならなんでもOK)の指定によって、違うクラス型になる。

{Array-of String}で指定する場合、データ型は{Array-of String}になり、
{Array-of int}で指定するなら、データ型は{Array-of int}になります。



型がわからない時に利用するのではなく、クラス定義の時に、データ型によってクラス定義をしたい場合に利用される。
ドキュメントにパラメータ化クラスの説明がありますので、詳細はドキュメントをご参照下さい。


Messages In This Thread
#t , any , Type の違いは? - by umemura - 09-10-2013, 06:02 PM
RE: #t , any , Type の違いは? - by heavybugtracker - 09-13-2013, 02:52 PM
RE: #t , any , Type の違いは? - by umemura - 09-17-2013, 08:05 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  type-switch で Array-of 、HashTable-of を判別したい umemura 2 3,824 12-28-2012, 01:39 PM
Last Post: wbardwell
Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('966')